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

Programatically expand dynamic Radtree

1 Answer 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 01 Mar 2011, 06:07 AM
Hi,

I'm currently creating a tree dynamically using nodes with a ServerSideCallBack expandmode once the root nodes have been loaded. Is there any way for me to do this programatically? i.e. simulate the action of a user clicking on every treenode which in turn will populate the entire tree with data?

The actual use case is that I need to search for specific nodes on pageload in certain cases - the issue with this being that the tree is normally populated on the fly via user interaction. I've been trying to mimic this by attempting to recursively expand all nodes but have not had much success.

Using version 2010.3.1109.0

Thank you!,
Kesara.

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 02 Mar 2011, 12:27 PM
Hello Kesara,

I would like to suggest something very simple:
- why not in these cases (where you need to expand the entire TreeView) you just load the TreeView on the server without using the load on demand and multiple requests for this purpose - directly bind the TreeView or create the structure? And if the current conditions does not expect complete expand - you switch to the load on demand.

If this doesn't seem reasonable enough we will proceed with the requested. Please, let me know what do you think about that.


Regards,
Nikolay Tsenkov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
TreeView
Asked by
Sam
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or