Can anybody explain to me how I handle the DataError Event? I have the following code but the error does not get picked up by any of them. Looking at e.Context shows " Parsing | Commit | CurrentCellChange ", how do I get the individual values?
if (e.Context == DataGridViewDataErrorContexts.Commit) { MessageBox.Show("Commit error"); }
if (e.Context == DataGridViewDataErrorContexts.CurrentCellChange) { MessageBox.Show("Cell change"); }
if (e.Context == DataGridViewDataErrorContexts.Parsing) { MessageBox.Show("parsing error"); }
if (e.Context == DataGridViewDataErrorContexts.LeaveControl) { MessageBox.Show("leave control error"); }
|