Hi team,
In need DataGridView Cell on KeyUp event for validation and in database store purposes.
Why I need it: I need it so that I handle any user input (any key user pressed in the data grid currently edited cell) without to have explicit SAVE button and without explaining the user that he/she needs to leave the current editing cell in order his/her data to be properly stored in to database.
It is very important for my user data handling UI scenario.
Can this be done?
Great thanks!
Best Regards!
Hi,
I would recommend handling the CellValidated/CellValidating events and do the validation and saving there.
Or handle the CellBeginEdit/CellEndEdit events.
If you really intend to save on any keystroke, you might want to look into using a Custom Cell Editor.
Best regards
Frank
There is an alternative (and easier approach):
Alternatively you can remove the handler on CellEndEdit using this.dataGridView1.EditingControl
Please find a small sample attached.
Best regards
Frank
I really intend to validate and save on any keystroke.
Can you please suggest some example for custom cell editor.
Thank you!
Please login first to submit.