Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataGridView CalendarColumn example doesn't handle keyboard input

$
0
0

 

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: 

  1. Enter the date cell with the mouse
  2. Type a new month with the numeric keys only
  3. 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


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>