Here's the scenario (which uses a BindingSource bound to a DataTable within a DataSet):
- A user creates a new address book contact, fills in the First and Last name in data-bound controls.
- He presses Apply, whose event handler calls BindingSource.EndEdit().
- He then realizes there was a mistake, and adds an email address.
- But when he presses Apply, validation fails (invalid email format), so EndEdit() isn't called.
- He decides not to make the edit, and presses the Cancel button, whose event handler calls BindingSource.CancelEdit().
- But, rather than reverting to the new contact with just a First and Last name and no email, the BindingSource has instead gotten rid of the entire record.
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.