Only certain columns in Datagrid are allowed to edit.

  • Thread starter Thread starter Chrysan
  • Start date Start date
C

Chrysan

How do I control only some of the columns in Datagrid are
allowed to be editted?

Should I use DataView or DataTable as the DataSource of my
Datagrid?

Thanks.
 
Columns in a datagrid can be marked as readonly so in windows they cant
be edited and on the web they remain html and arent replaced with a
textbox

Ciaran
 
The datasource doesn't matter
Check out the DataGridColumnStyle class

/claes
 
Hello Chrysan,

You should set the ReadOnly property for these columns to true. As far as I
remember, this property is published by the DataGridColumnStyle class that
is the root from which all other data grid column types inherit.
 
Back
Top