Quantcast
Viewing all articles
Browse latest Browse all 12583

Removing DataGridViewRow while in edit mode

Hi,
I have a DataGridView and use CellValidating event/method for validating. If I try to remove a row which is beeing edited but does not contain valid input, removal will fail because editing can not be canceled (Operation did not succeed because the program cannot commit or quit a cell value change.) But it works fine if I cancel it manually (pressing Esc key) and then remove a row. What is the differnce between canceling it manualy by pressing an escape key and canceling because of row removal? What should I do before removal or should I disallow removal and wait for CellEditEnd?

Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>