Skip to main content

Microsoft Silverlight

Answered Question Renaming Properties in the Service MetaData ClassRSS Feed

(0)

RogerGu
RogerGu

Participant

Participant

870 points

255 Posts

Renaming Properties in the Service MetaData Class

This must be so simple, but I just can't find it. How do I rename a property in the metadata class of the domain service, so that a DataForms displays a better field name? Shouldn't something like on of these work?

[Display("Status")
public int statusId;

or:

[Name("Status")
public int statusId;

or

[DisplayName("Status")
public int statusId;

etc...

 I tried using this:

[Description("Status")
public int statusId;

but the DataForm still shows 'statusId' as the field name.

 

Thanks,
Roger


 

 

jay nanavati
jay nana...

Contributor

Contributor

3388 points

624 Posts

Answered Question

Re: Renaming Properties in the Service MetaData Class

Hey correct syntax is here:

[Display(Name = "Status:")] 

Jay K Nanavaty
www.technologyopinion.com
Mark as answer if it helps. It will also help others...

jay nanavati
jay nana...

Contributor

Contributor

3388 points

624 Posts

Re: Re: Renaming Properties in the Service MetaData Class

If you want to add description than:

[Display(Name = "Status", Description = "Status description here")] 

Jay K Nanavaty
www.technologyopinion.com
Mark as answer if it helps. It will also help others...

jay nanavati
jay nana...

Contributor

Contributor

3388 points

624 Posts

Re: Re: Re: Renaming Properties in the Service MetaData Class

Here is very good resource about datafrom:

http://pendsevikram.blogspot.com/2009/03/silverlight-3-dataform-control-features.html

Jay K Nanavaty
www.technologyopinion.com
Mark as answer if it helps. It will also help others...

RogerGu
RogerGu

Participant

Participant

870 points

255 Posts

Re: Renaming Properties in the Service MetaData Class

Thank you.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities