TreeGrid


dhtmlx.com/docs/products/kb/inde … 96&a=10866



Can you tell me what is wrong with this code that it is not displaying the plus sign if there is only one parent node?



Below is the code that i have used to construct the tree



XML string used is <?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<rows parent=“a”>
 <row id=“1”>
    
    <row id=“2”>
   
    
     <row id=“3”>
        
     
 




and the javascript code is



function doMTDTreeGrid(){<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>



        mtdTreeGrid = new dhtmlXGridObject(“treeGrid”);<o:p></o:p>



                  mtdTreeGrid.selMultiRows = true;<o:p></o:p>



                  mtdTreeGrid.setImagePath("/codebase/imgs/icons_greenfolders/");<o:p></o:p>



                  mtdTreeGrid.setHeader(“Header1,Header2,Header3,Header4”);<o:p></o:p>



                  mtdTreeGrid.setInitWidths(",,,");<o:p></o:p>



                  mtdTreeGrid.setColAlign(“left,right,right,right”);<o:p></o:p>



                  mtdTreeGrid.setColTypes(“tree,ro,ro,ro”);<o:p></o:p>



                  mtdTreeGrid.enableTreeCellEdit(false);<o:p></o:p>



                  mtdTreeGrid.setSkin(“light”);<o:p></o:p>



                  mtdTreeGrid.enableTreeGridLines();<o:p></o:p>



                  mtdTreeGrid.init();<o:p></o:p>



                  mtdTreeGrid.loadXMLString(mtdXml);<o:p></o:p>



      }



 



 

XML , which you are using is incorrect, it must have next top element
<rows parent=“0”>


In current xml you are reffering for some unkwnow element "a"

Except of that - all other works correctly
Sample sent by email. ( if issue still occurs for you - please check that you have such image as /codebase/imgs/icons_greenfolders/plus1.gif