datagridview 设置某列一列不能被编辑private void dataGridView1_CellBeginEdit(object sender, DataGrid
datagridview 设置某列一列不能被编辑
private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
if (e.ColumnIndex==2) // 2代表第二列
{
e.Cancel = true;
}
}
