DataGridView - Cancel User Added Row

G

Guest

In a databound DataGridView I handle the Validation event. If validation
fails I set the DataGridViewCellCancelEventArgs e.Cancel to true and the
Row.ErrorText to an appropriate message.

If this is a new row that the user has just added, then if validation fails
I want the user by pressing <Esc> or something, to be able to cancel the
whole row addition. This would handle the scenario in which the user
discovers part way that he does not have the information to make a valid new
entry.

Any ideas welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top