Print Page | Close Window

Change DisplayName

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=784
Printed Date: 28-Mar-2024 at 8:00am


Topic: Change DisplayName
Posted By: aladdin
Subject: Change DisplayName
Date Posted: 24-Apr-2008 at 12:47pm
If you want to change the Column DisplayName (global) from AdaptedPropertyDescriptor for every entity.


public class FoundationModule : ModuleInit {  

    public override void AddServices() {

         Model.EntityPropertyDescriptors.Customers.CompanyName.SetDisplayName("Company");
         Model.EntityPropertyDescriptors.Customers.ContactName.SetDisplayName("Contact");
         ...
         Model.EntityPropertyDescriptors.Employee...

This work but is the best way to do it ?
Thanks



Replies:
Posted By: Bill Jensen
Date Posted: 01-May-2008 at 9:42am

It's certainly a reasonable way to go, assuming doing when the Foundation module is loaded is early enough. 

Also, I'm not sure I'd put it in the AddServices() method.  Better to factor into a different "AdjustColumnDisplayNames()" method.
 
Bill J.



Print Page | Close Window