In Datagrid, when I input a wrong value in a cell(say, letters in numberical cell), the datagrid automatically rollback to the original value. How can I implement this in the new datagridview
Note that I have tried to use e.Cancel=true in DataError event, but not success.
Thanks.

How to rollback datagridview value for invalid input?
SAM SAM
You can use the CellValidating event to validate the content of the cell. Set e.Cancel to true if the value is invalid. It will prevent the value from being committed and the user to leave the cell.
Hope this helps.
Thx, -regis
z2bass
Scooter26
Hope this helps!
-mark
DataGridView Progam Manager
Microsoft
This post is provided "as-is"