SelectedItem event not fired: RadGridView within DataTemplate of RadTreeListView

Raul

I have a GridView in the DataTemplate of a TreeListView. Sometimes (quite often) the SelectedItem event of the GridView is not fired. I can see that the items are visually correctly selected but sometimes only the SelectedItem event of the TreeListView is fired (checked by an output within both SelectedItem properties).

Raul

there are no binding errors. The SelectedItem event is fired for some items, but not all. Therefore the binding is ok and the items are all loaded and displayed. Only problem is that the initial SelectedItem event is not fired. If I switch between the items of the GridView then the event which previously was not fired works as intended.
So the problem is when the node of the TreeListView is selected it shows the DataTemplate and automatically selects the first item but sometimes forgets to fire the SelectedItem event.

Raul

there is no error. The system remembers the SelectedItem of each GridView, so after reopening it no event is fired.

But I still have a problem because I want to know if another branch has been opened and which DataGrid item is now selected. Changing the DataContext of the SelectedItem property so that all DataGrids use the same DataContext didn't solve the problem.

Any idea how this can be done?

Greetings
Raul

Yoan

In order to achieve this functionality, you can try to implement a logic for selecting only a single row in every grid. You can check this GitHub example for a reference. You can also check this forum thread.

As a side note - Although GitHub is a very well-known platform we saw a better and easier approach for reviewing our examples developing our SDK Samples Browser. You can also use it to review the examples.

Regards,
Yoan
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.