Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ctrl+S is DataGrid does not save data
Message
From
01/01/2007 07:12:21
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
Ctrl+S is DataGrid does not save data
Environment versions
Environment:
C# 1.1
Miscellaneous
Thread ID:
01181178
Message ID:
01181178
Views:
81
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
Next
Reply
Map
View

Click here to load this message in the networking platform