Hi damu maddy,
As @Sheng Jiang said, there is no built-in property to support this behavior. But we can implement by our own code.
When you change a cell’s value, it cause CellValueChanged event. We can set ReadOnly property to a row, a column or a cell. Try something like the following:
private void Form1_Load(object sender, EventArgs e)
DataTable dt1 = new DataTable("dt1");
"tag");
for (int i = 0; i < 10; i++)
"aa");
DataGridViewCheckBoxColumn checkBoxColumn = new DataGridViewCheckBoxColumn();
this.dataGridView1.Columns.Insert(0, checkBoxColumn);
this.dataGridView1.CellValueChanged += new DataGridViewCellEventHandler(dataGridView1_CellValueChanged);
void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
if (e.ColumnIndex == 0)
// if checked
if (dataGridView1.CurrentCell.Value.ToString() == "True")
// make the row readonly except the first cell(check box)
true;
false;
else // unchecked
false;
If you have any other questions, please feel free to ask.
Best regards,
Ling Wang
Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.