This is a migrated thread and some comments may be shown as answers.

Node Expands and collapses back

2 Answers 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Peter Ryckaert
Top achievements
Rank 1
Peter Ryckaert asked on 30 Jul 2010, 10:00 AM

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 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Tsenkov
Telerik team
answered on 02 Aug 2010, 08:41 AM
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
0
Peter Ryckaert
Top achievements
Rank 1
answered on 02 Aug 2010, 08:47 AM
Youpie that's it dude :-)
Thanks !
Tags
TreeView
Asked by
Peter Ryckaert
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Peter Ryckaert
Top achievements
Rank 1
Share this question
or