I have Winforms C# DataTable bound to DataGrid.
User edits cell and press Ctrl+S without leaving cell.
Edited data is not saved to database.
When user moves to other row, save works OK.
How to save without leaving cell ?
I have the following code in DataGrid subclass :
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) {
switch (keyData){
case Keys.Control | Keys.S:
((CurrencyManager)BindingContext[
DataSource, DataMember]).EndCurrentEdit();
((BusinessForm)FindForm()).Save();
break;
Andrus