Here's the scenario (which uses a BindingSource bound to a DataTable within a DataSet):
Is there any way to only undo actions since the last time EndEdit() was called? I was under the impression that's how CancelEdit() was supposed to work.
As an explanation, the DataTable only holds 2 states for a record, the Original and Current. Your request would require multiple states.
To achieve what you want you should flush the changes to the database (eg Adapter.Update(table)) in response to a successful Apply. That promotes your Current to Original and the next Cancel can fall back to that.
This may or may not match your requirements though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With