How do I Change how my Fields render?

Please install Silverlight or click download to watch video locally.

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: 08 May 2008

Watch    Video   |   Download    Video

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

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

Comments : 15

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!

ak99372 : On June 27, 2009 4:07 AM said:

Why are all the routing paths, metadata hints and tables hardcoded as string?!? Read small size project have around 50 objects and if I'd use this and change the object name or file name I wouldn't even get compile error... which makes it useless. One thing Microsoft could do with the technologies (they copied from other frameworks) is to at least finish them to the point when they can be used in other than just simple examples or presentations...

bathomas48 : On August 26, 2009 11:11 PM said:

[Range(0, 4, ErrorMessage = "Enter a number between 0 and 4")]

public object CumGpa;

The above code works for a range of values.

I need some assist on code for a list of three values, not range.

Any ideas?

Thanks

bnygren40 : On September 30, 2009 3:06 PM said:

How does this handle SQL2008 Geography Data Types? This is a problem for LINQ to SQL. And if not how would I go around this. Knowning that Geography Data type contains several variances such as polyline, Coordinates (long/Lat), Polygons etc.

Leave a Comment

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

Microsoft Communities