What's the recommended solution for expanding a tree view when bound to an object data source. The created nodes are collapsed by default and I don't see a way to change the default behavior, nor do I see any events indicating when a node is added
3 Answers, 1 is accepted
0
Kiril
Telerik team
answered on 01 May 2008, 01:16 PM
Hi Kevin Meyer,
Thank you for writing.
Currently, there's no way to achieve this behavior. However, our plans for Q2 2008 include making the RadTreeNodeCollection observable, so you'll be able to expand a node just after it is added. For the time being, you can traverse the tree view structure after it has been bound and expand the desired nodes.
If you have any further questions, please contact us.
Has there been any change to this? I'm currently databinding and it seems that I can't expand the tree to say the 2nd level. The only thing that seems to work is the ExpandAll.
Thanks
-Matt
0
Victor
Telerik team
answered on 18 Nov 2009, 12:02 PM
Hi Matt,
Thank you for the question.
If you are looking for a way to expand nodes on a particular level you can use the commands that RadTreeView provides. You should use the NodeExpandCollapseCommand in particular.
I am afraid that we have not yet added the ability to react on a node being added directly to the Nodes collection.
Please write again if you need further assistance.