Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Make DataGrid TemplateColumn read-only in code

Reply
Thread Tools

Make DataGrid TemplateColumn read-only in code

 
 
Bob
Guest
Posts: n/a
 
      07-09-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using TemplateColumn and DataGrid in code =?Utf-8?B?TXJDcm9vbA==?= ASP .Net 2 08-07-2006 10:41 AM
TemplateColumn-- how to make it zero width? Jim Bancroft ASP .Net 2 05-17-2005 09:19 AM
Create TemplateColumn on datagrid exclusively with code behind Ricardo ASP .Net Datagrid Control 2 04-11-2005 08:33 PM
Create TemplateColumn on datagrid exclusively with code behind Ricardo ASP .Net 2 04-11-2005 08:33 PM
Image TemplateColumn DataGrid Viewstate =?Utf-8?B?U3RldmUgUg==?= ASP .Net 0 02-26-2004 06:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57