How Do u Lock a Particular Column in a datagrid?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hii!!

I have a datagrid which i am using for both dispaly and as well as taking
input from the user.

Noe there is a particular column which i need to lock, so that the user
cannot enter anydata.

How do i do it?

Thanks
Venu
 
Hi,

Assuming it's a WinForms datagrid, configure DataGridColumnStyles for all
the columns (you will need to configure a DataGridTableStyle as well). Then
set the ReadOnly property on the corresponding ColumnStyle to true.
 
Back
Top