Node Expands and collapses back

3 posts, 1 answers
  1. Peter Ryckaert
    Peter Ryckaert avatar
    16 posts
    Member since:
    Jul 2006

    Posted 30 Jul 2010 Link to this post

    Has I still don't know how to add a expand icon on a treeview, I use the Onclick event to check if I need to load the children node of a treeview... 

     

     

    if (parentId != 0) {

     parentNode = tree.findNodeByValue(parentId);

    }

     

     
    ... Code to Add Nodes 

    tree.commitChanges(); 

    if (parentId != 0) {

     parentNode.set_expanded();

    }

     

     
    Result is great.... The node expands... But it collapses back !

  2. Answer
    Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 02 Aug 2010 Link to this post

    Hi Peter Ryckaert,

    Could you please try calling the set_expanded method over the node object with bool value (for expand - true, e.g. node.set_expanded(true))?
    I think this is what's missing here.

    Hope this is going to help you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Peter Ryckaert
    Peter Ryckaert avatar
    16 posts
    Member since:
    Jul 2006

    Posted 02 Aug 2010 Link to this post

    Youpie that's it dude :-)
    Thanks !
Back to Top