DisplayName Attribute

Hi.

The Attribute "DisplayName" is not working.

How can I change the field display name?

This is my code:

[MetadataType(typeof(ProccesMetadata))]
public partial class Process
{
    public class ProccesMetadata
    {
        [DisplayName("Parent Process")]
        public object proceso_id { get; set; }

        [DisplayName("State")]
        public object estadoproceso_id { get; set; }
    }
}
 

Thanks in advance

Regards

0
gbarbosa
5/4/2009 1:58:28 PM
asp.net.dynamic-data 1365 articles. 0 followers. Follow

4 Replies
1111 Views

Similar Articles

[PageSpeed] 21
Get it on Google Play
Get it on Apple App Store

Try to put the metadata class outside the class process:

[MetadataType(typeof(ProccesMetadata))]
public partial class Process
{
}

public class ProccesMetadata
{
   [DisplayName("Parent Process")]
   public object proceso_id { get; set; }

   [DisplayName("State")]
   public object estadoproceso_id { get; set; }
}
 
If this answers your question, please select 'mark as answer' thanks!



Andrea Dottor
Microsoft MVP - ASP/ASP.NET
http://blog.dottor.net
0
andreadottor
5/4/2009 2:44:34 PM

 It's the same..

 I found the solution...

I rename the proceso_id field for  Process1

The final code is:

    [DisplayName("Parent Process")]
    public object Process1 { get; set; }

 

Thanks !!!

 

0
gbarbosa
5/4/2009 2:58:15 PM

The syntax appears OK, I think your partial class is almost certainly not being recodnised, a quick way to check this is to add a property that does not exist and if you recieve no runtime error the whole partial class is not seen

i.e.

public partial class Process
{
    public class ProccesMetadata
    {
        [DisplayName("Parent Process")]
        public object proceso_id { get; set; }

        [DisplayName("State")]
        public object estadoproceso_id { get; set; }

        public object DUMMY { get; set; }
    }
}

This should cause a runtime error if your partial class is being seen.


Steve Big Smile

Seeking the elegant solution.
[Oh! If olny I colud tpye!]
c# Bits blog
Oh, and don't forget to mark as answer any posts that help you Big Smile
0
sjnaughton
5/4/2009 3:04:03 PM

Thanks Steve - I added your tip to the Dynamic Data FAQ.


Rick -ASP.Net UE  My DD Blog  DD FAQ
0
ricka6
5/5/2009 2:58:50 AM
Reply:

Similar Artilces:

Dynamic Data And Ado.Net Data Service
Hi,I'm wondering if it is possible to mix up Dynamic Data and Ado.Net Data Service.I have found no information on google yet.Thanks for your replies, Hasan Yes you will be able to have a look at the Preview on Codeplext here the new Domain Service will allow this sort of thing see David Ebbo's and Nukhil Kothari's sessions at mix09 Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms .NET RIA Services - Building Data-Driven Applications with Microsoft Silverlight and Microsoft ASP.NETSteve Seeking the elegant solution.[Oh! If olny I colud tpye!]c# Bits...

Dynamic Data over ADO.NET Data Service
I would like to create a dynamic data web site that does not have a database connection to the underlying database, but instead accesses the data through an ADO.NET data service.  Is this possible?  Thanks,Dennis If you look at the Dynamic Data Futures solution on CodePlex, it has an early version of something that does that.  Also, see this thread. thanks,David David,  That's exactly what I was looking for.  However, I am running into a problem when I try to develop my own dynamic data client site.  I created a dynamic data web site, added a referenc...

Dynamic Data with ADO.NET Data Services
Is it currently possible to use Dynamic Data with ADO.NET Data Services? I've had a play with this to see if this would work but I didnt have much luck. I ran the datasvcutil.exe against my service (which is a  ADO.NET Data Services on a LINQ to SQL model) but I ended up with a "The context type 'Entities.NorthwindDataContext' is not supported" message.  It seems to make sense that these technologies would work together...is there something else I am missing? Perhaps this functionality isn't supported yet? Thanks, Craig Hi Cr...

Dynamic Data with ADO.NET Data Services #2
I'm using the DynamicData Futures Preview 2 DLL's to create an n-tier Dynamic Data website using ADO.Net Data Services.I'm trying to add Many-to-Many relationship support using David Ebbo's article as a basis, but it would appear that the client-side model generated by DataSvcUtil.exe (Add Service Reference....) doesn't contain enough information to identify Many-to-Many relationships?For example, I have Contacts and Regions joined through a ContactRegion table.  EF models this correctly on the server and DataServices exposes it correctly - With a Contact having a Re...

Dynamic Data working against an ADO.NET Data Service
 Is there an example available of Dynamic Data using an ADO.NET Data Service?  I read there are prototypes of this in the works, are they available for review / use?  Check out our Dynamic Data Futures for a prototype data source control for consuming ADO.NET Data Services. http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14475.Scott HunterPM, ASP.NET Team, Microsoft...

Can I use ADO.NET Data Services with Dynamic Data Websites?
I would like to use Dynamic Data Websites with the proxy class generated from WebDataGen.exe.  Is this possible?  Also, does the SchemaCreator class support the Provider model? In the current CTP, Dynamic Data only supports Linq To Sql models.  In th next release, it will also support Entity Framework models.  However, it won't directly support ADO.NET data services, though we are looking at this scenario for a later release. thanks,David...

Dynamic Data SP1 chokes on Northwind and AdventureWorks using ADO.Net Entity Data Model
Now that SP1 is out, I'm trying out DD with ADO.Net EDM and ScaffoldAllTables=true. I am using Northwind first and AdventureWorks second in two separate websites as my databases. Both render the My Tables page correctly. When you drill down 1 or 2 levels deep, it bombs. Example: Using adventureworks db, click on address table, then click on viewEmployeeAddress in the first row. I get this: A property with name 'Address.AddressID' does not exist in metadata for entity type 'DDAdventureWx.EmployeeAddress'.Is this supposed to work with ADO.Net EDM "right out of the ...

Attribute caching in Dynamic Data
 Hi, I was hoping someone could clarify how attribute caching works in Dynamic Data.It seems that when ever table is first called it's attributes are cached in memory.Is this correct? Could it be possible to do this caching in application start or somewhereelse to force all tables to be cached at once? Regards, Erkka What's your goal? Reading attributes has minimal cost compared to hitting the DB.Rick -ASP.Net UE  My DD Blog  DD FAQ  Every time table is hitted for the first time it takes noticeable longer time to render.I had assumption that  this w...

Dynamic Data WebSites Vs Dynamic Data Entities WebSite
Can anyone list some of basic differences between Dynamic Data WebSite and Dynamic Data Entities WebSite? When would you choose one over the other? Dynamic Data WebSites  requires a Linq to SQL data model. Dynamic Data Entities requires an ADO.Net Entity Framework data model.Rick -ASP.Net UE  My DD Blog  DD FAQ...

dynamic data and the style attribute
Hi,I'm trying to set the padding on an image control dependent on the image height that comes back from an API call.  The image control is inside a repeater.So far, I'm creating a data table in a dataset, adding rows from the data that the API returns, and then finally binding that to the repeater.I've tried putting in the image height data into a field, but a) asp:image doesn't have a style attribute and b) doing an img runat="server" element and then plonking the #eval("mydata","{0}") into the style attribute of that element doesn't work - it doesn't process the eval, it just spits it...

Dynamic Data Attribute Trouble.
I have a property of an object called Contract. It is called client (the GUID of Client in the contract table links to the client in the Client table). I am trying to manipulate its (the client property of the contract entity) order in the dynamic data grid using the new columnorder attribute in the dynamic data futures. I am also trying to manipulate its filter order using the filter attribute. Both attributes can be seen here, I am using code as is from these examples: http://quickstarts.asp.net/previews/dynamicdata/dd_NewAttributes.htm I am using EF and dynamic data futures. I ca...

Preview Release of Dynamic Data and Dynamic Data Website Wizard Available
Today we are releasing public updates to Dynamic Data and some new tooling support called the "Dynamic Data Website Wizard". These new releases are available for anyone to download the code gallery site at: http://code.msdn.microsoft.com/dynamicdata. Through this new site we will be able to release more frequent updates of these features. We would like to continue to have feedback on these new features via this forum. Here is a direct link to the download: http://code.msdn.microsoft.com/dynamicdata/Release/ProjectReleases.aspx?ReleaseId=853 One of the very cool new features is th...

Missing Dynamic Data Website and Dynamic Data Web Application templates
 I have installed VS 2008 SP1 and .Net 3.5 SP1 but I still don't see the Dynamic Data Website and Dynamic Data Web Application templates when I try to create a new website or web application. Hi, when you choose to add a new project make sure that the targeted framework is indeed 3.5 and that you select the C# or VB.NET root node or in the Web node. Normally they should be in there. When I installed it on one of my laptops I didn't see them either. I didn't check the 3.5 framework and apparently it stood on 3.0 causing me to go like  until I found it. ...

Data Dynamics Releases SharpUI for .NET
Data Dynamics, Ltd. is pleased to announce the release of SharpUI for .NET. SharpUI for .NET is a complete toolkit of user interface controls for Windows Forms applications including toolbars, menus, dockable tool windows, data-bound input controls, panel controls and a style manager to help maintain a consistent look and feel. SharpUI for .NET is a fully managed component and provides integration with the Microsoft Visual Studio .NET IDE. SharpUI Toolbars features a command-based architecture, dockable toolbars, menus, and tool windows, built-in keyboard state labels for status bars, ...

installing sp.Net Dynamic Data
I downloaded the service pake beta1 from www.Asp.net but i coudln't see the asp.net dynamic data  when i start visual studio what shall i do next to start with it Thanks Hi Abli you create a new web site and choose Dynamic Data Web Site but I woudl follow one of the tutorials here and whatch this one first Your First Scaffold and What is Dynamic Data? Also You will need  Download Dynamic Data Runtime to have the very latest bits (these sit on top of SP1, what's in SP1 is not the latest release of DynamicData)Steve Seeking the elegant solution.[Oh! If olny I colu...

Web resources about - DisplayName Attribute - asp.net.dynamic-data

DeAndre Brackensick - American Idol
For all respectful discussion of DeAndre, both positive and negative.

BlackBerry - Smartphone Help Support Services & Step By Step Setup - US
Searching for help for your BlackBerry smartphone? Find user manuals, articles, downloads, docs, warranty info and more at the official BlackBerry ...

BlackBerry - Smartphone Help Support Services & Step By Step Setup - US
Searching for help for your BlackBerry smartphone? Find user manuals, articles, downloads, docs, warranty info and more at the official BlackBerry ...

Code indentation in SubEthaEdit
There's a recent message on the Yahoo! group for SubEthaEdit asking about automatic formatting of code in SubEthaEdit. By building on SubEthaEditTools ...

Education news - Boston Globe - MCAS results - latest education news - Boston.com
Bully Boy Distillers: Half off tours of Boston’s first craft dist... Get this deal BostonGlobe.com Boston.com Home Today's Globe News Your Town ...

Introducing Lync 2010 Super Simple Auto Answer Video Kiosk with Full Screen
... Source={x:Static properties:Settings.Default}, Path=sipEmailAddress, Mode=OneWay}" PhotoDisplayMode="Large" Text="{Binding DisplayName, E ...

IdentityBlog - Digital Identity, Privacy, and the Internet's Missing Identity Layer
Kim Cameron's Identityblog contributes to the discussion of Identity and Privacy issues and technology. If focuses on the user-centric identity ...


People API - MySpace Open Platform: Documentation Wiki
Any request for the groups - @friends , @all , or some custom group ID - will only return the default fields for friends. Requests using the ...

Secure JSON Services with Play Scala and SecureSocial
... socialUser.id = userId socialUser } else { null } } } } def save(user: SocialUser) { if (find(user.id) == null) { val firstName = user.displayName ...

Resources last updated: 11/25/2015 5:26:27 AM