TreeGrid : Colums width automatically fill space

Find code here before you post.
Locked
linb
Site Admin
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

TreeGrid : Colums width automatically fill space

Post by linb »

   
Class('App', 'xui.Com',{
    Instance:{
        iniComponents : function(){
            // [[Code created by CrossUI RAD Tools
            var host=this, children=[], append=function(child){children.push(child.get(0))};
            
            append(
                (new xui.UI.Dialog)
                .setHost(host,"ctl_dialog2")
                .setLeft(10)
                .setTop(10)
                .setWidth(380)
                .setHeight(230)
                .setCaption("TreeGrid : Colums width automatically fill space")
            );
            
            host.ctl_dialog2.append(
                (new xui.UI.TreeGrid)
                .setHost(host,"ctl_treegrid2")
                .setRowNumbered(true)
                .setRowHandler(false)
                .setColHidable(true)
                .setColMovable(true)
                .setHeader([{"id":"col1", "width":30, "type":"input", "caption":"30%[100~300]", "relWidth":true, "maxWidth":300, "minWidth":100}, {"id":"col2", "width":70, "type":"input", "caption":"70%[100~300]", "relWidth":true, "maxWidth":300, "minWidth":100}, {"id":"col3", "width":80, "type":"input", "caption":"fixed:80"}, {"id":"col4", "width":60, "type":"input", "caption":"fixed:60"}])
                .setRows([["row1 col1","row1 col2","row1 col3","row1 col4"],["row2 col1","row2 col2","row2 col3","row2 col4"],["row3 col1", "row3 col2", "row3 col3", "row3 col4"]])
            );
            
            return children;
            // ]]Code created by CrossUI RAD Tools
        }
    }
});
Class('App', 'xui.Com',{
    Instance:{
        iniComponents : function(){
            // [[Code created by CrossUI RAD Tools
            var host=this, children=[], append=function(child){children.push(child.get(0))};
            
            append(
                (new xui.UI.Dialog)
                .setHost(host,"ctl_dialog2")
                .setLeft(10)
                .setTop(10)
                .setWidth(380)
                .setHeight(230)
                .setCaption("TreeGrid : Colums width automatically fill space")
            );
            
            host.ctl_dialog2.append(
                (new xui.UI.TreeGrid)
                .setHost(host,"ctl_treegrid2")
                .setRowNumbered(true)
                .setRowHandler(false)
                .setColHidable(true)
                .setColMovable(true)
                .setHeader([{"id":"col1", "width":30, "type":"input", "caption":"30%[100~300]", "relWidth":true, "maxWidth":300, "minWidth":100}, {"id":"col2", "width":70, "type":"input", "caption":"70%[100~300]", "relWidth":true, "maxWidth":300, "minWidth":100}, {"id":"col3", "width":80, "type":"input", "caption":"fixed:80"}, {"id":"col4", "width":60, "type":"input", "caption":"fixed:60"}])
                .setRows([["row1 col1","row1 col2","row1 col3","row1 col4"],["row2 col1","row2 col2","row2 col3","row2 col4"],["row3 col1", "row3 col2", "row3 col3", "row3 col4"]])
            );
            
            return children;
            // ]]Code created by CrossUI RAD Tools
        }
    }
});
   

Locked