hi regarding dhtmlxtree…
how to get a list of childs, child childs, child child childs and so on… of a particular node in tree?
for example:
Consider tree…
A—B–C—D
B-E-F
E-G
Consider Node B, i need all the child nodes of Node B
i.e. C,D,E,F,G
Hello,
There is the getAllSubItems method. It returns list of all child items:
dhtmlx.com/dhxdocs/doku.php? … llsubitems
thanks for the reply…
i know this method and i have used this method already…
As you said getAllSubItems method will return list of all child items…but my requirement is different
Req: consider a node with same text exists at different paths of tree…now i want the child nodes of a nodes (having same name) which exist at different paths of hierarchy…
Consider tree…
A—B–C—D
B-E-F
E-G
Consider Node B, i need all the child nodes of Node B
Note: here B exists at diffrent places in the tree with childs C,D and E,F
similarly E exists at different places in the tree…with childs F and G
So, finally childs of B are C,D,E,F,G
In this case you need to iterate through all tree nodes and check labels of items:
The getItemText(itemId) method allows to get text of an item.
var list = tree.getAllSubItems(0); /all items of the tree/
var items = list.split(",");
for(var i = 0; i < items.length;i++){
/your code here/
}