this.dataGridView1.Rows[e.RowIndex].Cells["btn"] as DataGridViewButtonCell;//获得button列单元格 DataGridViewCheckBoxCell dgvCheckBoxCell = this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex] as DataGridViewCheckBoxCell
DataGridViewDisableCheckBoxCell控件的代码直接分享: public class DataGridViewDisableCheckBoxCell : DataGridViewCheckBoxCell
for (int i = 0; i < dgvStudentList .Rows .Count ; i++) { DataGridViewCheckBoxCell cell = dgvStudentList.Rows[i].Cells["colCheck"] as DataGridViewCheckBoxCell; bool chk
for (int i = 0; i < dgvStudentList .Rows .Count ; i++) { DataGridViewCheckBoxCell cell = dgvStudentList.Rows[i].Cells["colCheck"] as DataGridViewCheckBoxCell; bool chk
otherValue == "True") { ((DataGridViewCheckBoxCell