I have a DateTimePicker cell in my DataGridView. I'd like to be able to enter edit mode and drop the calendar when a button is clicked. I'm able to do the first part without difficulty but the second isn't working. If I have a standalone DateTimePicker the SendKeys call does work as expected.
//Select the cell and enter edit mode - works
myDGV.CurrentCell = myDGV[calColumn.Index, e.RowIndex];
myDGV.BeginEdit(true);
//Send an ALt-Down keystroke to drop the calendar - doesn't work
SendKeys.SendWait("%{DOWN}");
From debugging I believe that the problem is that the keystroke is being sent to the DGV and not the specific cell that I'm trying to edit. The reason I think is is that I've put code to log keys received by the grids KeyPress and KeyDown events. They log my arrowing around the grid and the keys sent by SendKeys, but not those from when I'm editing a cell by typing in it.