When I execute the following script: tree loads 3 level


When I execute the following script: tree loads 3 levels of the tree.
(Root node, its children and sub children ) But, I want it to load only the
Root node initially. After that when user clicks on +  , it should load it’s children etc …


Can you please explain
me why does it load all the 3 levels although it is supposed to load only the
root node?


BTW, the jsp specified
for mygrid.loadXML(“getProductsXML.jsp?id=0”),


generates only the root
nodes initially.


But, your tool is
automatically loading it’s children. I want to stop this.



mygrid = new dhtmlXGridObject(‘productTreeGrid’);



mygrid.selMultiRows = false;



mygrid.imgURL = “images/tree/”;



mygrid.setHeader("<%=headerNames%>");



mygrid.setInitWidthsP("<%=columnWidths%>");



mygrid.setColAlign(“left,center,left,left,left”);



mygrid.setColTypes(“tree,ed,ed,ed,ed”);



mygrid.setColSorting(“str,str,str,str,str”);



mygrid.setColumnColor(“white,#ECECE4,white,#ECECE4,white”)



mygrid.init();



mygrid.loadXML(“getProductsXML.jsp?id=0”);



mygrid.kidsXmlFile=“getProductsXML.jsp”;<o:p></o:p>


Probably XML contains open attribute for each node.


Thus
nodes are loaded opened, and as they contain children, tree loads these
children from server passing there new request. Solution: remove
“open” attributes where they are not necessary.<o:p></o:p>