如图所示,我需要根据“选中状态”的值来设置该行格式,选中就使整行变绿,我用的是CellValueChanged事件,但只有当该单元格失去焦点后才触发改变格式,怎么样才能在处于编辑时,只要勾选就触发格式改变呢?
CurrentCellDirtyStateChanged
https://msdn.microsoft.com/zh-cn/library/system.windows.forms.datagridview.currentcelldirtystatechanged.aspx
非常感谢楼上回答,直接在CurrentCellDirtyStateChanged事件中提交更改,就能实时触发CellValueChanged事件了
If DataGridView_Manu.IsCurrentCellDirty Then
DataGridView_Manu.CommitEdit(DataGridViewDataErrorContexts.Commit)
End If