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
标签:End,Sub,单元格,WinForms,选中,DataGridView1,DataGridViewCheckBoxCell,chkCell From: https://www.cnblogs.com/rf8862/p/17476305.html