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
840
how to clear the webdata tree nodes on client side
posted

Hi,

I have implemented the webtree view funcationality on the client side. I have done following things

Adding of parents and its childs and its working fine. but the problem is while adding new nodes, previous nodes are not clearing . I did not find clear nodes method in Client Side Api.

Can you let me know how to clear the nodes on client . i want clear the all the nodes from the client side.

Thanks in advance

 

 

Parents
  • 49378
    posted

    Hi anilkoomar_1202,

    Thank you for posting in the community.

    Removing individual nodes client-side can be achieved using the remove() function. For instance the first child of the first root can be done using:

    ig_controls.WebDataTree1.getNode(0).get_childNode(0).remove()

    You can "clear" all items from the tree by removind all root nodes. This can be achieved using something similar to:


            function removeAll() {
                while (ig_controls.WebDataTree1.getNodes().get_length() > 0) {
                    ig_controls.WebDataTree1.getNodes().getNode(0).remove();
                }
            }

    Please let me know if this helps.

Reply Children