How to roll back changes in gridview in case of incorrect input

Posted by Mustafa A. Jabbar on Stack Overflow See other posts from Stack Overflow or by Mustafa A. Jabbar
Published on 2010-03-17T06:35:23Z Indexed on 2010/03/17 6:41 UTC
Read the original article Hit count: 238

Hi,

I have a DataGridView that is bound to a list of object. It has some columns that the user can edit. There are certain inputs that are not allowed for a row as a whole. How can I roll back if the user enters invalid inputs in some cell. I tried using the RowValidating event handler but it was not called after cell value has been changed. Even when I implemet CellValueChanged, I still cannot roll back the changes.

Any idea how to accomplish this

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms