<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Property Names</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Property Names</description>
  <pubDate>Sat, 11 Apr 2026 23:56:23 -700</pubDate>
  <lastBuildDate>Thu, 05 Nov 2009 16:22:33 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1543</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Property Names : Terry:We actually already have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1543&amp;PID=5748#5748</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1543<br /><strong>Posted:</strong> 05-Nov-2009 at 4:22pm<br /><br />Terry:<br><br>We actually already have a feature request for that (#1178), which was placed on hold for reasons I can't determine at the moment. In any event, it makes sense to me, too, so I've reopened that request so that the discussion of it will get reopened.<br><br>In the meantime, here's some code that shows how to wire up the PropertyNameToDisplayNameTranslator:<br><br>&nbsp;&nbsp;&nbsp; private void InitializeVerifierEngine() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _entityManager.VerifierEngine.PropertyNameToDisplayNameTranslator =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delegate(Type pType, String pPropertyName) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // the following will surround the PropertyName with brackets <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // in every single verifier result description<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return "&#091;" + pPropertyName + "&#093;";<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // the following is an example of how to change a specific property on a specific Entity<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //if ((pType == typeof(Employee)) &amp;&amp; pPropertyName.Equals("HireDate")) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; pPropertyName = "Emp Hire Date";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //return pPropertyName;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp; }<br>]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 16:22:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1543&amp;PID=5748#5748</guid>
  </item> 
  <item>
   <title>Property Names : I&amp;#039;m havingsome issues with...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1543&amp;PID=5733#5733</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=619" rel="nofollow">Waxman</a><br /><strong>Subject:</strong> 1543<br /><strong>Posted:</strong> 04-Nov-2009 at 7:43am<br /><br />I'm having&nbsp;some issues with property names during validation.&nbsp; I've got an entity with a 'LastName' property that automatically gets a <FONT size=2>&#091;</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Display</FONT></FONT><FONT size=2>(Name=</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Last Name"</FONT></FONT><FONT size=2>, AutoGenerateField=</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>true</FONT></FONT><FONT size=2>)&#093; attribute, which is great.&nbsp; My UI (Telerik) grid view automatically picks up on this attribute and displays the specified name when bound to the property.&nbsp; I guess I'm surprised that the verification messages don't use this by default (it still just shows "LastName" by default).&nbsp; Is there a reason?&nbsp; Do I need to switch something on to allow this?<DIV>&nbsp;</DIV><DIV>Next issue: I know the documentation shows the order in which it will try to determine the property name to display, so to try to overcome the first issue, I've set the engine's 'PropertyNameToDisplayNameTranslator' property to a custom method in which I try to discover the 'DisplayAttribute' mentioned above and use the Name value specified.&nbsp; However, my method never gets called.&nbsp; I have no idea why.&nbsp; I set this property as soon as I create my entity manager and notice that this property is initially null.&nbsp; When I get into one of my entities, its verifier engine still seems to have a valid reference to my method, but it doesn't seem to matter - it just never gets called.&nbsp; Am I missing something?</DIV><DIV>&nbsp;</DIV><DIV>Of course, I would love to just have it use the Display attribute by default, and if there is no current implementation to allow it, consider this my vote for a future feature.</DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>Terry</DIV></FONT>]]>
   </description>
   <pubDate>Wed, 04 Nov 2009 07:43:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1543&amp;PID=5733#5733</guid>
  </item> 
 </channel>
</rss>