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
274
Remove all nodes on client side
posted

I need to have a javascript function in my ASP.Net page I can call that will:

  1. Find the WebTree control
  2. Remove all the nodes from the tree

Any help would be greatly appreciated.

Parents
No Data
Reply
  • 6748
    Verified Answer
    posted

    Hello Richard,

     

    Thank you for your source code. I had a look and I found out that the reason that you cannot find the tree with the ClientID is that the ClientID returns the id with underscores, while the method expects it without. You can handle the InitializeTree client side event and save the id that is passed to this method for further use:

    function IncludeList_InitializeTree(treeId){

          //save treeId

    }

     or you can use the string returned by the ClientID, and replace all the underscores with empty strings:

    var treeid = "<%=IncludeList.ClientID %>".replace(/_/g, "");

                var tree = igtree_getTreeById(treeid);

    Let me know if you have further questions with this issue.

     

    Regards,

    Lyuba

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

     

     

Children