I have a datagridview bound to a bindingsource which has a datatable (an access mdb file) as the underlying data storage.
I've been saving changes like this (which seems to be working fine):
Now if the user selects to NOT save the changes, I tried to do this:Code:EventBindingSource.EndEdit() 'apply changes to underlying datasource EventTableAdapter.Update(TimetrackerDataSet)
And it indeed does not save the changes to the database, but if I am still working in the datagridview and happen to call up the record that was edited again, the changes are still there. If I close the form and reopen it then the changes are gone (like they should be).Code:EventBindingSource.CancelEdit() 'EventBindingSource.ResetCurrentItem() 'EventBindingSource.ResetBindings(False) EventTableAdapter.Update(TimetrackerDataSet)
Is there a more direct way to say "forget everything since the last save and make the datagridview reflect that"?
Thanks
Dave


Reply With Quote
