Click here to Skip to main content
14,869,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

I have two columns in datagridview. The first column is bounded from the datatable and the second column is empty. The definition of the columns are like this:
DataGridViewTextBoxColumn textColumn = new DataGridViewTextBoxColumn();
textColumn.DataPropertyName = "column1";
textColumn.Name = "column1";
textColumn.ReadOnly = true;

textColumn = new DataGridViewTextBoxColumn();
textColumn.Name = "column2";

How can I make column2 always in edit mode?

Thanks in advance.
RDBurmon 1-Feb-12 13:09pm
Is this your C# code ? are you adding column to datagridview dynamically ?

Dear Salah_Afa,

Do the ReadOnly option of second column as FALSE. It will hence make the second column editable.

Hope the above solution helps yot out.

1.First of all Use BoundColumns

2.Make your editable as column ReadOnly=false

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900