Wednesday, June 01, 2011 3:24 AM
How to make some columns in datagridview editable and some columns are non-editable in the same datagridview control??
Wednesday, June 01, 2011 4:38 AM
You can do that in the designer, rightclick on the datagridview, select the column and set it to ReadOnly = true
It results in this code in the designer.vb
' 'Column1 ' Me.Column1.HeaderText = "Column1" Me.Column1.Name = "Column1" Me.Column1.ReadOnly = True '
Wednesday, June 01, 2011 6:13 AM
You can do that by setting the column(s) that you want to be non-editable, as readonly
DGView.Columns("ColumnName").ReadOnly = True