Skip to main content
Home Forums Silverlight Programming WCF RIA Services Renaming Properties in the Service MetaData Class
4 replies. Latest Post by RogerGu on July 5, 2009.
(0)
RogerGu
Participant
870 points
255 Posts
07-04-2009 6:25 PM |
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
Twitter
jay nana...
Contributor
3388 points
624 Posts
07-05-2009 3:03 AM |
Hey correct syntax is here:
[Display(Name = "Status:")]
07-05-2009 3:05 AM |
If you want to add description than:
[Display(Name = "Status", Description = "Status description here")]
07-05-2009 3:10 AM |
Here is very good resource about datafrom:
http://pendsevikram.blogspot.com/2009/03/silverlight-3-dataform-control-features.html
07-05-2009 4:52 PM |
Thank you.