Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Swapnil deshmukh on Sep 09, 2008 00:37
open dhtmlx forum
setChildCalcMode not working

When I used tree.enableSmartXMLParsing(true); method to load the tree setChildCalcMode is not working (not showing numbers of nodes) but when I removed the tree.enableSmartXMLParsing(true), setChildCalcMode is working (showing numbers of nodes). Please help me I want to use bot menthod to improve the performance of the tree . I wrote the following code

tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("dhtmlxTree/samples/images/");
tree.setIconSize(18,18);
tree.enableMultiLineItems("320px");
tree.enableSmartXMLParsing(true);
tree.setChildCalcMode("child");
tree.enableAutoTooltips(true);
tree.setOnClickHandler(function(id){openPathDocs(id);});
tree.setXMLAutoLoading("fmea_tree.jsp?project_id="+project_id+"&sys_id="+sys_id);
tree.loadXML("fmea_tree.jsp?project_id="+project_id+"&sys_id="+sys_id,autoselectNode);
                        
and please suggest me other way to improve the tree performance.
Answer posted by Support on Sep 09, 2008 03:38
In case of smartXMLParsing mode , tree doesn't parse closed branches, so it has not info about count of child items , and can't show any info
If you are using only smartXMLParsing ( without setXMLAutoloading ) , it possible to use "child" attribute in XML, to specify count of child items

<tree id="0">
 <item child="4" text="Books" ...

In such case tree, will use value of "child" attribute as count of childs.