Hi,
it took me a while to find out the actual behavior of the GridView, but I think I got and now and would just like to point out a misleading example and ask if I've misunderstood something.
When attaching to the RadGridView.SelectedCellsChanged-event, I get the following behavior:
1. When a complete row was selected and the grid is sorted/grouped, I receive a SelectedCellsChanged-event with the newly added cells (all cells of the row). However, the GridViewSelectedCellsChangedEventArgs do not contain the removed cells. Is this by design because the removed GridViewCellInfo-instances are no longer part of the updated grid?
2. When only single cells were selected and the grid is sorted/grouped, the selection of these cells seem to be cleared. However, I do not receive a SelectedCellsChanged-event. This is okay for me, as I can still listen to
- the RadGridView.Sorted-event
- the RadGridView.Grouped-event
and clean up my ViewModel-CellSelection there. But this leads to the misleading example "Grid View - Selection" in the WPF Controls Examples suite. Here, the SelectedCellsBindingBehavior.cs only listens to the SelectedCellsChanged-event, which results in cells still being listed in the "Selected cells:"-Listbox of the example after a sorting operation, although they are no longer selected.
Greetings,
Andree
I can confirm that I was able to replicate the behavior you described and it is not very intuitive even though it seems to be the case by design. I will discuss this with our development team and update you as soon as I have more information on the matter. We will also consider updating the example which you referenced.
Thank you for your patience.
We can confirm that this is a bug at our end and I have thus logged the following bug report in our feedback portal regarding it on your behalf. As a thank you for bringing this to our attention, I've awarded you with some Telerik points.
Please follow the feedback item to get notified about any changes in its status. I do hope you can achieve the desired result by handling the Sorted and Grouped events for the time being.
Greeting,
Andree