hi there,
does anyone know how to make one column in the datagrid view to become readonly,
thanxxxxxx
hi there,
does anyone know how to make one column in the datagrid view to become readonly,
thanxxxxxx
You can set it in the designer by rightclicking the datagridview and Selecting Edit Columns. Then select the column you want and on the right you can alter its read-only property.
In code you can use dataGridView1.Columns["ColumnName"].ReadOnly = true;
the paremter specified accepts only type int, if i try to pass it a string compiler complains
if you mean here: << .Columns["ColumnName"] >> you can pass it a column number like this: <<.Columns[0]>>, with 0 being the first column in the DGV
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.