Reject Changes method is called, any rows still in edit-mode cancel their edits. Modified and deleted rows return back to their original state (Data Row State. You can use the Cell Validating event to check the contents of the cell just before it is committed.
I've been thinking about how to handle this situation and the only thing I have come up with is to detect when the validation is triggered from a UI event rather than the initial binding or bound list change.
Not only is this a hacky solution, but don't see how it could be done.
I've basically circumvented the databinding and implemented my own poor version.
This was not intentional, it's REALLY old code that had complicated parsing and formatting requirements and I incorrectly implemented a solution based on an unbound column.
I've seen several posts here and on other sites that are similar to my question/problem, but have never really seen anything directly on-target and with a good answer (if I missed one in my search, please point me to it! Please forgive me if this is long, but I want to give as complete/accurate a descriptions as I can... I have a Windows form with side-by-side datagridviews (dgd Applications & dgd Eligible Files).
dgd Applications is set for Full Row Select and validation (Causes Vailidation = true).
How can I get dgd Applications_Mouse Click to execute?
Canceling this event cancels the changes to the current cell.
I now know the correct way to handle this and have since fixed my code, however I'd still like to know how I could have solved the bug another way.