Print Page | Close Window

DomainModel Attributes

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1265
Printed Date: 25-Mar-2025 at 8:29am


Topic: DomainModel Attributes
Posted By: swylie
Subject: DomainModel Attributes
Date Posted: 19-May-2009 at 2:56pm
I have a text box that I want to set the MaxLength of an different bound entity property.  The attribute is global::IdeaBlade.Util.v4.MaxTextLength(9)]
 
How do I get the value of one of those attributes at runtime so I can set the MaxLength value?
 
 
 



Replies:
Posted By: eileenv
Date Posted: 19-May-2009 at 4:31pm
There is a method in Util (for v5.1.0 and up, Util has been renamed to Core).ReflectionFns which will return the MaxTextLength value:
 
public static int GetMaxTextLength(Type pEntityType, string pPropertyName)
 


Posted By: swylie
Date Posted: 27-May-2009 at 2:50pm
Thanks that worked perfectly.



Print Page | Close Window