S
Soul
Hi,
I have multiple Mdi child forms within a parent form. All Mdi child forms
will have one DataGrid on it, the DataGrid is bind to a DataView and the
DataView is again bind to a DataTable. In addition, there is a save button
on the parent form.
My problem is if a user finish input data into the last cell of the DataGrid
of an active child form but never press the control+enter key or navigate to
other cell. The current row will still in edit mode (a pen icon infornt of
the first column of current row).
Then if the user press on the save button on the parent form, the last input
data will not be saved. I have tried SendKeys, but it doesn't work!!
When the save button being clicked, it will loop through all Mdi child forms
and call the following function in all Mdi child forms to get the updated
DataTable:
public DataTable UpdatedTable
{
get
{
SendKeys.Send("^{ENTER}");
return this.dataTable.GetChanges();
}
}
I understand that the SendKey doesn't have to be in all Mdi child forms, I
am just testing it out. Can anyone help me on this issue?
Thank you.
I have multiple Mdi child forms within a parent form. All Mdi child forms
will have one DataGrid on it, the DataGrid is bind to a DataView and the
DataView is again bind to a DataTable. In addition, there is a save button
on the parent form.
My problem is if a user finish input data into the last cell of the DataGrid
of an active child form but never press the control+enter key or navigate to
other cell. The current row will still in edit mode (a pen icon infornt of
the first column of current row).
Then if the user press on the save button on the parent form, the last input
data will not be saved. I have tried SendKeys, but it doesn't work!!
When the save button being clicked, it will loop through all Mdi child forms
and call the following function in all Mdi child forms to get the updated
DataTable:
public DataTable UpdatedTable
{
get
{
SendKeys.Send("^{ENTER}");
return this.dataTable.GetChanges();
}
}
I understand that the SendKey doesn't have to be in all Mdi child forms, I
am just testing it out. Can anyone help me on this issue?
Thank you.