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

Unable to expand a branch on client side

1 Answer 42 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
AK
Top achievements
Rank 1
AK asked on 27 Oct 2010, 06:55 PM
Hi,

I have a Treeview control nested inside a RadComboBox. The Expand mode is ServerSideCallBack. I want to select a node in the tree through javascript. But the branch for that node is not expanded. I know all the ancestors of that node. So I tried to expand that branch starting from the top level parent. I use the following piece of code to expand the parent.

if

 

(parentNode != null && !parentNode.get_expanded()) {

 

_treeFirst.trackChanges();

parentNode.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack);

parentNode.set_expanded(

true);

 

_treeFirst.commitChanges();

}


This expands only the second level parent (the first level parent is already there and expanded on the initial load). I am not able to expand further from the second level. Please help!!

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 02 Nov 2010, 02:15 PM
Hi AK,

Could you please, try expanding the new level on clientNodePopulated event instead synchronously?

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
Tags
TreeView
Asked by
AK
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or