Hello, I'm having this simple issue, I said it all in the title.
I'm using the RadGridView with SelectionMode="Extended" and SelectionUnit="Cell".
I've attached a sample project that reproduces the issue.
Repro steps:
- Select cell "Manchester"
- Ctrl-click again on cell "Manchester"
- It puts it in edition mode instead of deselecting it
I've found a workaround where I ctrl-click on another cell ("Cell B"), then ctrl-click on the initial cell ("Cell A"), then ctrl-click on "Cell B" again, so that both cells are deselected. From what I understand, this is because the behavior is different whether I ctrl-click on the last selected cell, or on any other selected cell.
How can I fix this? Thanks! :)
At the moment, my best lead is to subscribe to the BeginningEdit of the RadGridView and do this:
private void OnBeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e) { if (KeyboardModifiers.IsControlDown) { AssociatedObject.SelectedCells.Remove(AssociatedObject.SelectedCells.Last()); e.Cancel = true; } }
This way, the cell does not enter edit mode, and it is deselected.
But I don't understand why it is still visually selected. Maybe some call that I'm missing to refresh the UI?