Updating data grid on form close
Hi Team
I have a datagrid that I have manually bound to a data table. It all works OK. When the user closes the form the app asks if the user would like to save the changes. This works OK if they use the Close button I put on the form. However, when the user closes the form with the form's X button on the top right, the datagrid does not move off the current record and save its changes in the data table. This means that when I go to write to the database the grid changes are not in the data table.
Is there a way I can force the data grid to write its changes to the data table?
Thanks
Re: Updating data grid on form close
This is untested but you may be able to call Validate on the DataGrid before performing the save. If that doesn't work, you could probably just set focus to some other control.