DataGridView Cell Validating only when 'Enter' is pressed

Posted by Eldad on Stack Overflow See other posts from Stack Overflow or by Eldad
Published on 2010-04-21T09:12:20Z Indexed on 2010/04/25 12:23 UTC
Read the original article Hit count: 283

Filed under:
|
|

Hi,

I want to validate and commit the value entered in the DataGridViewCell ONLY when the user presses the 'Enter' key.

If the users presses any other key or mouse button (Arrow keys, Pressing a different cell using the mouse...), I want the behavior to be similar to the 'ESC' key: Move the focus to the new cell and revert the edited cell value to its previous value.

© Stack Overflow or respective owner

Related posts about winforms

Related posts about .NET