Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
get numbers of Childnodes (Web Data Tree)
posted

Hello,

i need the number of childnodes in an parentNode of a Web Data Tree. I think it exists a function like getNodes().childnodes().length or something else. Anybody nows the correct Syntax?

Thanks.

Parents
  • 3147
    Verified Answer
    posted

    Hi Patrick,

    Here is a simple example of how to obtain child node count on the client:

    var tree = $find("WebDataTree1");
    var count = tree.getNode(0).get_childrenCount();

    The above code retrieves a tree instance by ID and then gets the children count of the first root node.

Reply Children
No Data