Britt Wescott
Britt Wescott

Reputation: 568

Get Specific Node in Silverlight Telerik Treeview

I am using the Telerik Silverlight TreeView control to build a Treeview on-the-fly.

Is there any way for me to retrieve a specific node in the tree view based on an int value?

For example, GetNode(10) would return a RadTreeViewItem for the 10th node in the TreeView, regardless of whether or not it is indented.

Thanks, Seth

Upvotes: 1

Views: 891

Answers (1)

mle_ii
mle_ii

Reputation: 468

Doesn't appear to be, though I've never used the Teleric TreeView before.

Why do you need access to a specific item?

If you really need to do this some expensive work arounds would be to create a list that you added a reference to the TreeViewItems as you create them. Also, depending on how large the tree gets you could just go through the items until you go to the nth, item.

If you just need to get to the data or content of the item you could have the treeview be a databound tree and just change the data instead of the treeview.

Upvotes: 1

Related Questions