Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Feb 22, 2007 10:35
open dhtmlx forum
When I execute the following script: tree loads 3 levels of the tree. (Root node, its children and su...

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";

Answer posted on Feb 22, 2007 10:38

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.

Answer posted by radyno (Support) on Dec 11, 2014 04:56

The information connected with free download event calendar and php grid control also can help you, so please check it too.