How do I allow edit only a particular column in datagridview in windows application

69

How do I allow edit only a particular column in datagridview in windows application -

// Set the ReadOnly property of the other columns to true.

// Notes: You'll probably need to loop through the Columns collection and use an if statement
 
dataGridView1.ReadOnly = false;
dataGridView1.Columns[1].ReadOnly = true;
dataGridView1.Columns[2].ReadOnly = true;

Comments

Submit
0 Comments