The treeview does not expose recursive search out of the box. It is also harder to search recursively when the virtualization is enabled. I believe you have a data bound scenario. What I would suggest here is to use a Dictionary to keep track on your items and the appropriate path they have. For instance a Dictionary<string, string> will be ideal for this purpose as your nodes are populated with only strings.
For example let's assume we are having a tree like:
If you search for "B1", that same key will have a value path "B//B1" in your dictionary and it will bring this very path into view. Following this approach you will have a predefined Dictionary with the appropriate keys that can be later used for the search.
Furthermore keep in mind that the BringPathIntoView()
method will work properly only if you set the TextSearch.TextPath
attached property. This is due to the fact that the method internally uses the TextPath value to match every part of the path to corresponding property value from the business object / (or radtreeeviewitem in non databound tree).
Hope this helps.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items