Hey all-
I have a DataGridView in which I wanted to host a DateTimePicker, so I used the example from:
http://msdn2.microsoft.com/en-us/library/7tas5c80.aspx
Has anyone gotten this example working properly for keyboard input? It works great when you use the mouse, but under certain circumstances the value from the editing control doesn't get back into the datagridview.
To reproduce:
- Enter the date cell with the mouse
- Type a new month with the numeric keys only
- Hit Tab or enter to leave the cell.
Now, the above works fine if you leave the editing control with the mouse, or if you use the up/down arrow keys to change the month value.
I did some debugging in the editing control, and it appears that if the follow the steps about the EditingControlFormattedValue property is not being called after the OnValueChanged function fires. Normally that property is being retrieved prior to the EndEdit event on the datagridview.
Does anyone have any ideas on what to check?
Thanks,
Korey