ObjectReference not set to object after CancelEdit
I've defined a bound datagrid in a Windows form. It displays fine and handles all updates OK EXCEPT...
I've added a ColumnChanging handler that under some circumstances, issues a CancelEdit call (I wish to reject the current record and instead create several new records in the table based on the information input). I've also tried RejectChanges and have the same problem.
This error does NOT occur when the CancelEdit or RejectChanges is issued. Instead, the program waits until the ColumnChanging handler completes and then it happens. Although there is no explicit call to it, the Public Class declaration at the top of the form code is immediately highlighted after hitting the End Sub of the ColumnChanging handler, and the error message then displays. Additionjally, the Details button on the error message box doesn't work and I have to click the X in the upper right hand corner to close it and shut down the applciation, so I have no further information.
What is going on?