DataGridView.CellContentClick is not firing if I mouse click a DataGridViewCheckBoxCell very fast. How can I solve this? I need to know when CheckBox’s check state changes
DataGridView.CellContentClick is not firing if I mouse click a DataGridViewCheckBoxCell very fast. How can
Share
Try handling the
CellMouseUpevent.You can check which colum the
MouseUpevent occurred in to see if it is your checkbox column.You can also find out if it is in edit mode and end the edit mode programmatically, which in turn will fire the
CellValueChangedevent.In the example below, I have a DataGridView with two colums.
The first is a
DataGridViewTextBoxColumnand the second is aDataGridViewCheckBoxColumn.When the checkbox changes, the first column wil reflect its check state, without having to move from the row or cell.