function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
anjuanju 

How to get children of a dojo tree node. Please help....urgent

I have created a dojo tree with 3 level. How can I get all the children of first level?
It would be great if anybody can help me.
Thanks in advance.
cheenathcheenath
Dojo tree node got a chidlren array. So you can hold the root node in a global variable and
loop through the children array to get all the first level children.

for eg:

  var root; // dojo tree root

  for (var  i  = 0;  i<root.children.length;  i++)  {
    var child = root.children[i];
  }


HTHs,

 
anantanant

Thank you cheenath.

I have got the immediate childs.

Thanks a lot.

anjuanju
Thanks cheenath. I solved my issue.