Today I decided to search once again on the web for a solution and found one on a fellow programmer's blog. He calls it a "dodge", but I think it's an excellent solution.
Basically, you're overriding the Datagrid class, and then overriding the ProcessCmdKey method such that you can filter out the SHIFT+SPACE combo. However, I suppose it would be better to actually be able to alter the method that creates this behavior in the first place! Since we can't do that, this is the next best thing.
Just create the class below in your project, and then replace Datagrid objects with DataGridFix objects. You shouldn't need to make any other changes to your project.
/// This class is derived from the DataGrid class so that I can disable the "feature" that selects
/// a row by using SHIFT+SPACE
public class DataGridFix:System.Windows.Forms.DataGrid
// a couple of setup bits
const int WM_KEYDOWN = 256;
public static extern int GetKeyboardState(ref Byte pbKeyState);
public static extern int SetKeyboardState(ref Byte bpKeyState);
// over-ride the 'ProcessCmdKey' method
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Keys keyCode = ((Keys)msg.WParam.ToInt32()) & Keys.KeyCode;
if (msg.Msg == WM_KEYDOWN && keyCode == Keys.Space)
if (Control.ModifierKeys == Keys.Shift)
// if the keystate is SHIFT+SPACE, make it just a SPACE
byte keystates = new byte;
keystates = 0;
return base.ProcessCmdKey(ref msg, keyData); // let the base method handle everything else as-is
I also need to give credit for the CSS code which make the code above easy to read.