Make DataGrid TemplateColumn read-only in code

B

Bob

I have a data grid with a template column. Sometimes I
need this column to be read-only, even in edit mode.
Does anyone know how to do this. I get the other columns
by running through the DataGrid.Columns and testing for
column type. Then I can set ReadOnly for Bound columns or
make the Edit or PushButton columns invisible, but I
can't seem to do this with a template column.
Is there any way to access the control used in
EditItemTemplate for the TemplateColumn in code?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top