c# - CurrentCellDirtyStateChanged commits too soon -


i have datagridview text column , checkbox column. when user clicks checkbox want prompt user. i've got working using code below:

private void grid_currentcelldirtystatechanged( object sender, eventargs e ) {   var grid = sender datagridview;   if ( grid.iscurrentcelldirty)     grid.commitedit( datagridviewdataerrorcontexts.commit ); } 

however, when try type in text column keeps committing type instead of when i'm finished typing. causes text cell keep highlighting , allowing me enter single character. how modify event handle when checkbox value changes?

what need pay attention checkbox, not text. solution have found similar problem put event on cellenter recorded field being edited. dirty handling event checks decide do.

why coordinates aren't available in dirty check can't imagine.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -