If I execute the following line
DataGrid1.Dispose();
it will commit all user changes being made via databinding. I'd like to
know how I can commit all user changes to all controls within a form without
having to Dispose of the controls.
I have a component that tracks which of my business objects are modified
during the lifetime of its parent form, but unfortunately if the user closes
the form without leaving the focussed control (cell in a datagrid) the
change is not applied until the Dispose method is executed, and by then my
component has been disabled.
So I basically need to commit all changes made within the form's controls
from within the Closing event. I need to perform this function from within
my component's code so will therefore have no knowledge of the specific
controls on the form or their types.
Thanks
Pete