C#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"); }
DataGridViewDataErrorContexts
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Eyal Lewin12 pointsPosted Mar 22, 2010, 4:09 AM EDT