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

[Solved] nodes set .Expanded=true still show "expand" (+) icons on parent node

3 Answers 163 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 22 Jun 2008, 01:31 AM
I have 4-level unbound tree and selectively expand (drill down into) some nodes (multiple levels down) based on querystring parameters.

The desired child nodes and child-child nodes are displayed, but the expansion icons on the parent nodes still show a collapsed state (+). Clicking on the icon to expand the node triggers the ServerSideCallBack, resulting in a duplicate set of child nodes. The expansion icon does then change to the expanded state (-).

When I decide to add child nodes in code I first set .Expanded=true on the parent node. This would seem to be the correct property to set, but it doesn't yield the desired result.

Before I post code, I'm just wondering if I'm missing something here (obvious or not).

Rob

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 23 Jun 2008, 03:12 PM
Hi Robert,

Everything sounds correct. I am wondering how exactly you drill down the nodes, so posting a code will definitely help us find the problem quicker.

Thanks

All the best,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Baatezu
Top achievements
Rank 2
answered on 23 Jun 2008, 08:56 PM
This kinda sounds like something I encountered.

If you are creating a node and adding the sub-nodes on the server side then the parent node will need it's expand mode set to client side.

The basic idea is - Since you are expanding and adding the sub-nodes on the server, without the node requesting it, the nodes exist on the client side, so the expand method should be on the client side.

I hope that makes sense... If not - on the nodes that you are having trouble with, try changing the expand method to ClientSide and see if that fixes it. :)
0
Robert
Top achievements
Rank 1
answered on 23 Jun 2008, 09:34 PM
Thank you Baatezu! That appears to have solved my problem.
Tags
TreeView
Asked by
Robert
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Baatezu
Top achievements
Rank 2
Robert
Top achievements
Rank 1
Share this question
or