private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e) { if (e.ColumnIndex==2) // 2代表第二列 { e.Cancel = true; } }