• Home
  • Blog
  • About Me
  • Home
  • Blog
  • About Me
.NET

ASP.NET – Dynamic Data – Read Only Column

By Joe Gill  Published On 30th March 2009

This is a simple way to configure columns as Read Only when using Dynamic Data

Make two copies of the Text.ascx field template and name one ReadOnly.ascx and the other ReadOnly_Edit.ascx then annotate the field in your metadata partial class as follows

[UIHint(“ReadOnly”)]
public object UpdateDate;


This works fine as the UIHint uses the ReadOnly field template to display the column in display mode and the ReadOnly_edit template when in in edit mode. Both simply display the column using the aps:Literal control


Leave A Reply Cancel reply

You must be logged in to post a comment.

Microsoft Community Event Slides
Previous Article
Cork talk on using CLR inside SQL Server
Next Article