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

Navigating Items that are not yet expanded

2 Answers 27 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 29 May 2013, 02:00 PM
Hi,

I have a RadTreeView Control which i populate with RadTreeViewItems via the ItemSource Property.
Now i have to implement a Search functionality, that should work on all Items, starting from the current selected one and even on not expand items.

RadTreeViewItem offers NextItem, PreviousItem, Parent and so on, but those are only available when the tree is expanded (which means item is prepared as far as i understood)

It's possible to navigate down to the first occurence of a matching item, but how can i search further in the tree on the next sibling or so when they are not expanded?

I think it must be possible to search for an item and bring it into view from a not expanded tree...

Any help would be reeally appreciated...

2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 29 May 2013, 05:25 PM
Hi Jonathan,

When working with a data-bound RadTreeView, it's best to implement the search functionality on the data collection that is displayed in the RadTreeView. We've uploaded a sample solution demonstrating how to implement a filter, search and sort operations on the data represented by a RadTreeView in GitHub.

Furthermore, if your scenario requires you to bring virtualized items into view, I'd recommend using the BringPathIntoView() method as demonstrated in this tutorial.

Regards,
Tina Stancheva
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jonathan
Top achievements
Rank 1
answered on 30 May 2013, 02:53 PM
Thanks for the answer.

I was hoping that's not necessary, but I can live with it.
thanks, your answer and the links helped me.
Tags
TreeView
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Jonathan
Top achievements
Rank 1
Share this question
or