Checkbox on Datagrid with auto-generated columns, how to pass check-state to source without row change?
I have a windows form with DataBound DataGrid on it. Bound to a 开发者_如何学Clist of objects. One of the objects property's is a boolean. So the grid shows it as a Checkbox.
When I click on the check box the tick appears or disappears but does not update the underlying data, until I change rows.
This is a bit counter intuitive, is there fix?
after a bit of rummaging around in mdsn, quickview and immediate window:
dataGridView1.CommitEdit(DataGridViewDataErrorContexts.CurrentCellChange);
!
精彩评论