public bool EditingControlWantsInputKey( Keys key, bool dataGridViewWantsInputKey) { // Let the NumericUpDown handle the keys listed. switch (key & Keys.KeyCode) { case Keys.Left: case Keys.Up: case Keys.Down: case Keys.Right: case Keys.Home: case Keys.End: return true; default: return false; } }