Vb net 2016 datagridview cellvalidating


vb net 2016 datagridview cellvalidating-83

1) Add a conditional statement in the event handler code to only execute when required.

2) Detach the event hander before the unwanted event triggers and re-attach after.

If I then ckeck the second checbox (cell_2), it gives me the error message but does not return the second checkbox I checked to its unchecked state. Any help appreciated, Bob In a datagridview (vs2005, VB.net) I have two columns that are checkboxes. Its not permissible to have the two selected to true, but they can both be false.

Cancel = True End If End If End Sub Say I checked just one checkbox Cell_1 to start, the code allows the change to be made. I press the sacep key after the e,cancel and the message and I get the same problem. I need to check that only one of the two can be checked.

Or if not, then it is because the user has entered an invalid value in the current cell.