New Posts New Posts RSS Feed: MaxTextLength
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

MaxTextLength

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: MaxTextLength
    Posted: 19-Jul-2007 at 3:44pm

On the DataRow there is an attribute called MaxTextLength but I don't see it exposed on the EntityColumn class. Is there a way to access it?

Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 19-Jul-2007 at 3:46pm

Try this:

 

      AttributeCollection atts = EntityPropertyDescriptors.Employee.FirstName.Attributes;

      foreach (Attribute anAttribute in atts) {

        if (anAttribute is MaxTextLengthAttribute) {

          MaxTextLengthAttribute maxAttr = anAttribute as MaxTextLengthAttribute;

          MessageBox.Show(maxAttr.MaxLength.ToString());

        }

      }

 



Edited by IdeaBlade - 20-Jul-2007 at 2:28pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down