Click here to Skip to main content
15,891,136 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:
C#
DataGridViewTextBoxColumn textColumn = new DataGridViewTextBoxColumn();
textColumn.DataPropertyName = "column1";
textColumn.Name = "column1";
textColumn.ReadOnly = true;
dataGrid.Columns.Add(textColumn);

textColumn = new DataGridViewTextBoxColumn();
textColumn.Name = "column2";
dataGrid.Columns.Add(textColumn);

How can I make column2 always in edit mode?

Thanks in advance.
Posted
Comments
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.

Thanks
 
Share this answer
 
1.First of all Use BoundColumns

2.Make your editable as column ReadOnly=false
 
Share this answer
 

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