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

SelectionChanged event doesn't fire when using Hierarchical Data Templates

2 Answers 284 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
DADean
Top achievements
Rank 1
DADean asked on 09 Jul 2018, 01:50 PM

I am trying to build a TreeView/Property Grid pair for my application.  In my application I have implemented the Hierarchical Data Template as described in the online documentation (https://docs.telerik.com/devtools/wpf/controls/radtreeview/populating-with-data/hierarchical-data-templates).  This populates the TreeView control as expected.

In binding the property grid to the SelectedItem of the TreeView, I found that I can only see the properties for the first TreeNode that is clicked.  In troubleshooting I tried updating the PropertyGrid through code, but I found that the SelectionChanged event only fires for the first node that is clicked on.  Any subsequent selection changes do not result in the SelectionChanged being fired.

How can I build this typical functionality into a Hierarchical Data Template based TreeView control?

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 10 Jul 2018, 02:26 PM
Hello Dave,

I attached a small example showing how to sync RadTreeView and RadPropertyGrid. Can you please give it a try and let me know if it helps?

Regards,
Martin Ivanov
Progress Telerik
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.
0
DADean
Top achievements
Rank 1
answered on 12 Jul 2018, 01:38 AM

Thank you Martin, the provided example helped me solve my issue.  I was trying to apply the same ItemTemplate for all levels of the hierarchy.

 

Please go ahead and close this support request.

Tags
TreeView
Asked by
DADean
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
DADean
Top achievements
Rank 1
Share this question
or