Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by abhishek on Sep 07, 2009 23:22
open dhtmlx forum
DHTMLX TREE: How to get child nodes of a particular node?

DHTMLX TREE: How to get child nodes of a particular node?

tree.hasChildren(Id); gives the number of child nodes
how to get the child node ids?

tree.getAllSubItems(Id)// gives all child nodes and sub child nodes.....
need only child nodes......
Answer posted by Alex (support) on Sep 08, 2009 03:27
Answer posted on Sep 08, 2009 03:32
i have tried the other way it worked fine......

var children=tree.hasChildren(Id);
        if(children>0)
        {
            for (i=0;i<children;i++)
            {
                var childid=tree.getChildItemIdByIndex(Id,i);               
            }
        }