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

expand branch to leaf

1 Answer 63 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Randy Hompesch
Top achievements
Rank 1
Randy Hompesch asked on 09 Feb 2017, 10:19 PM

Hi,

Is there a quick way to expand a branch to the leaves programmatically for a load on demand scenario?

Thanks ... Ed

 

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 13 Feb 2017, 08:43 AM
Hello Ed,

I already answered your question in the ticket thread. However, I am posting it also here.

"The GetItemByPath method and the bring into view support in general, will find the searched item only if is presented in the items source of the treeview control. When the load on demand feature is enabled the searched item is not yet added in the tree and the method cannot find it. 

In order to achieve your requirement, instead of using the load on demand event, you can move the method that gets the data in the view model. You can see how to do this in the How to Expand and Select Item with Load on Demand Enabled help article."


Regards,
Martin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
TreeView
Asked by
Randy Hompesch
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or