Search code examples
c#vb.netvalidationdatagridviewdatagridviewcheckboxcell

Datagridview checkboxcolumn validation


In a DatagridView I have databound checkboxcolumns. But if I check or uncheck multiple checkboxes, not all changes are saved. (It doesn't trigger the property Set method on all, maybe on every 2nd). However if I after each checkbox-click, click on another cell (column) before the next checkbox, then all actions will trigger the Set methods. So it seems the cell validation does not work on a per-cell basis, but on a per column basis (For the checkboxcolumn). So how do you solve this?


Solution

  • Found the answer: DataGridView with CheckBox cell problem

    But probably easier alternative is to put in the save button method:

    DataGridView.EndEdit();