This event occurs when any part of a cell is clicked, including borders and padding. It also occurs when the user presses and releases the SPACE key while a button cell or check box cell has focus, and will occur twice for these cell types if the cell is clicked while pressing the SPACE key.
To determine when the cell contents are clicked, handle the DataGridView.CellContentClick event.
This event does not receive information about the mouse position. If the event handler needs information about the mouse position, use the DataGridView.CellMouseClick event.
For clicks in a System.Windows.Forms.DataGridViewCheckBoxCell, this event occurs before the check box changes value, so if you do not want to calculate the expected value based on the current value, you will typically handle the DataGridView.CellValueChanged event instead. Because that event occurs only when the user-specified value is committed, which typically occurs when focus leaves the cell, you must also handle the DataGridView.CurrentCellDirtyStateChanged event. In that handler, if the current cell is a check box cell, call the DataGridView.CommitEdit(DataGridViewDataErrorContexts) method and pass in the DataGridViewDataErrorContexts.Commit value.
For more information about handling events, see Consuming Events.