In a DataGridView, pressing SHIFT and SPACE will by default select the entire row. The only solution I've found (referenced at vb.net DataGridView - Replace Shortcut Key with typed character) is to turn off the row select feature. While that works, it's not ideal, because I would still like to be able to select the whole row using the row selector (for example, to delete the row), and by changing the SelectionMode
property to anything other than RowHeaderSelect
I lose that ability. Is there a way to trap just the SHIFT+SPACE combination and replace it with a simple SPACE? It seems like none of the key events even recognize that keystroke when the control's MutiSelect
property is set to True
and the SelectionMode
property is set to RowHeaderSelect
, so I can't use those.
ETA: I thought maybe turning off MultiSelect
and changing the selection mode to CellSelect
, then adding an event handler for the RowHeaderMouseClick
event would work...nope.