Page view counter

How do I Change how my Fields render?

In this video you learn how to change the way that data fields are rendered. You will plug in third-party controls for some fields.

Presented by Scott Hanselman

Duration: 13 minutes, 4 seconds

Date: 8 May 2008

Watch the video   |   Download the video

Video downloads: WMV | Zune | iPod | PSP | MPEG-4 | 3GP

Audio downloads: AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Comments : 12

Leave a Comment

hebbsh : On June 09, 2008 8:43 PM said:

Dear Sir

       Thanks for Your Time,

 wher can i found Telerik and how to install it???

Regards

IHAB

grajasekaran : On August 07, 2008 11:50 AM said:

How can I use [metaDatatype(typeof(myMetaData))] in VB?

Also [DisplayFormat(DataFormatString="{0:yyyy-MM-dd}")] in VB. It shows error messages and doec not accept the format in VB

grajasekaran : On August 07, 2008 11:50 AM said:

How can I use [metaDatatype(typeof(myMetaData))] in VB?

Also [DisplayFormat(DataFormatString="{0:yyyy-MM-dd}")] in VB. It shows error messages and doec not accept the format in VB

cv_vikram : On August 15, 2008 5:33 PM said:

thanks....

prune : On August 15, 2008 9:56 PM said:

Make sure you have an imports to System.ComponentModel.DataAnnotations

Then use:

<MetadataType(GetType(ExampleMetadata))> _

Partial Public Class Example

See forums.asp.net/.../1302264.aspx for more

payini : On August 27, 2008 1:45 PM said:

In VB would be something like this:

<System.ComponentModel.DataAnnotations.MetadataType(GetType (BookMetadata))> _

Partial Public Class Book

End Class

<System.ComponentModel.DataAnnotations.DisplayFormat(DataFo rmatString:="{0:yyyy-MM-dd}")> _

   Public Property PublishDate() As Object

       Get

       End Get

       Set(ByVal value As Object)

       End Set

   End Property

<System.ComponentModel.DataAnnotations.Range(0, 100, ErrorMessage:="Please enter a quantity between 0 and 100")> _

   Public Property Quantity() As Object

       Get

       End Get

       Set(ByVal value As Object)

       End Set

   End Property

payini : On August 28, 2008 12:35 PM said:

This is GREAT. However I haven't been able to make changing the controls part work. FieldValue is not being recognized. Neither on VB or C#.  

I get "The name 'FieldValue' does not exist in the current context"

I'm using Visual Web Developer Express 2008 and I imported System.Web.DynamicData.

Any clue?

Thanks.

norisk : On October 10, 2008 10:38 PM said:

I have some 10,000 records in my table. If I do a vanilla DynamicData List, it is 100 pages and it takes several minutes to load.

I'm trying to follow this video to limit the view to just a few fields. Unfortunately, it seems to ignore my partial class and the attendant Metadata entry.

I'm working with VS2008 Pro in C#.

Do I have to somehow indicate that there will be a partial class that should override the default field list? Must I use a particular naming convention?

Thanks,

rtpharry : On October 13, 2008 1:53 PM said:

Lol did anyone else notice that when Scott mentioned DRY he said it twice?

rtpharry : On October 13, 2008 2:05 PM said:

Lol did anyone else notice that when Scott mentioned DRY he said it twice?

rtpharry : On October 13, 2008 2:06 PM said:

Haha ironic... I was flipping between browsers because FF3 wont do fullscreen and now IVE said dry twice :P

djibril_chimere_DIAW : On October 31, 2008 11:50 AM said:

Thanks! Jërëjëf!

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities