Sample: dhtmlxTreeGrid TreeGrid initialization dhtmlxTreeGrid main page
X

TreeGrid is initialized via script and populated from xml source


 
<div id="gridbox" width="600px" height="140px" style="background-color:white;overflow:hidden"></div>
<script>
 
        mygrid = new dhtmlXGridObject('gridbox');
        mygrid.selMultiRows = true;
        mygrid.imgURL = "../codebase/imgs/";
        mygrid.setHeader("Tree,Plain Text,Long Text,Color,Checkbox");
        mygrid.setInitWidths("150,100,100,100,100")
        mygrid.setColAlign("left,left,left,left,center")
        mygrid.setColTypes("tree,ed,txt,ch,ch");
        mygrid.setColSorting("str,str,str,na,str")        
        mygrid.init();
        mygrid.loadXML("test_list_1.xml");
</script>