Grid loses selection after sorting

1 Answer 35 Views
Grid
Brian
Top achievements
Rank 1
Iron
Brian asked on 25 Apr 2022, 08:24 AM

The Telerik Blazor Grid doesn't seem to retain the currently selected items when sorting. I've got a simple single select grid and have bound the SelectedItems property to a similarly named field in code behind. The SelectedItems field definitely contains a single entry ok and selecting items in the grid updates this as expected. However, when sorting, the grid no longer highlights the selected item as selected, and the check box column is not selected, even though the SelectedItems field still contains a single entry.

Is this the intended behaviour? And, if so, how can I get the grid to highlight the selected item after sorting?

I'm using Telerik Blazor UI 3.2.0.

Brian
Top achievements
Rank 1
Iron
commented on 25 Apr 2022, 08:55 AM | edited

Managed to resolve. Problem was resolved by calling ToList when instantiating my data source for the grid.

1 Answer, 1 is accepted

Sort by
0
Accepted
Brian
Top achievements
Rank 1
Iron
answered on 25 Apr 2022, 08:56 AM
Managed to resolve. Problem was resolved by calling ToList when instantiating my data source for the grid.
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Iron
Answers by
Brian
Top achievements
Rank 1
Iron
Share this question
or