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

Pre Select Node on DataBind??

1 Answer 75 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 03 Aug 2008, 10:18 AM
Hi

Is there a way to pre select a node on databind?

ie: the page will have a querystring of the fieldid/value that needs to be selected.

On page load and a querystring is detected, I want the RadTreeView to have that node item preselected. It could be a third level item too...

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 04 Aug 2008, 11:30 AM
Hello Michael,

You can use the RadTreeView.FindNodeByValue(string) method to find a Node by its Value. After extracting the Value from the query string you can use it with the method to get the Node and select it (after the TreeView has been bound).

Note: in order for the FindNodeByValue(string) method to work correctly, Nodes should have unique values.

Kind regards,
Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Michael
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or