DataGridViewCheckBoxCell单元格点击后立即更改选中状态
Private Sub DataGridView1_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseClick If DataGridView1(e.ColumnIndex, e.RowIndex).GetType = GetType(WinForms.DataGridViewCheckBoxCell) Then Dim chkCell As WinForms.DataGridViewCheckBoxCell = DirectCast(DataGridView1(e.ColumnIndex, e.RowIndex), WinForms.DataGridViewCheckBoxCell) chkCell.Value = Not chkCell.Value DataGridView1.EndEdit() End If End Sub