开发者

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);

!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜