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

[Solved] Expanded parent nodes not set to [-]

2 Answers 153 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
terrysmith
Top achievements
Rank 1
terrysmith asked on 06 Mar 2008, 10:35 PM
When adding a hierarchy of nodes server-side to a tree and then calling leafNode.ExpandParentNodes(), each parent node renders as [+] instead of [-].

Then clicking on the (invalid) plus sign to collapse the branch does nothing on the first click.On the second click it still does not collapse the branch, but it switches the graphic from [+] to [-]. On the third click it collapses the node and thereafter expands\collapses will work normally for that particular branch.

This behavior is in the most recent Prometheus update and the previous version as well.


Terry

2 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 10 Mar 2008, 01:20 PM
Hello,

My guess is that your TreeNodes have ExpandMode set to ServerSideCallback. In this mode nodes are expected to use a callback to load their children the first time they are expanded.

The easiest way to solve the problem is to set ExpandMode = ClientSide to all expanded nodes.

Greetings,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
terrysmith
Top achievements
Rank 1
answered on 10 Mar 2008, 03:54 PM
That fixed it. Thanks.

Node that are added by default have to be set to ExpandMode = ClientSide and nodes that are added dynamically have to be set to ExpandMode = ServerSideCallBack. Makes sense...


Tags
TreeView
Asked by
terrysmith
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
terrysmith
Top achievements
Rank 1
Share this question
or