日期:2014-05-18  浏览次数:20887 次

datagridview中DataGridViewComboBoxColumn 单击后引发事件
DataGridView 控件,绑定了数据库,其中一列(假设为col1)为 DataGridViewComboBoxColumn ,关联 Bit 类型数据,希望实现如下功能:
当单击col1列的CheckBox后,根据 CheckBox 是否打上勾,决定另一列(假设为col2)的值,如col1列为True,则Col2=1,Col1=false,则col2=0;且要立即在 DataGridView 中显示出来。

我试了CellValueChanged事件,要在点击之后,并离开该单元格后,才会触发事件,而CellContentClick事件更是莫名其妙。

不知道该用哪个事件?

------解决方案--------------------
datagridview.endedit();