Click here to Skip to main content
16,004,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For example I have 1 item: How can I set max length for Item1 = 80 max length

SQL
[Category(All)]
       [Description(Name)]
       [ReadOnly(false)]
       [DisplayName(sPropName)]
       [XmlAttribute]
       public override string Label
       {
           get
           {
               return base.Label;
           }
           set
           {

               value = value.TrimEnd();   ignorieren


               if (value.length > 80)
               {
                //here I want user not to allow to write more than 80 char
                  when user write something in  Name feild max Length 80 i want a user to allow

               }


           }
       }
Posted
Updated 1-Sep-14 23:50pm
v3
Comments
OriginalGriff 2-Sep-14 4:20am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Gihan Liyanage 2-Sep-14 4:36am    
I agree with OriginalGrif, at least you didn't given, what is the type of attribute.

C#
//set size of column 3 to 250
this.gridDataBoundGrid1.AllowResizeToFit = false;
this.gridDataBoundGrid1.Model.ColWidths[3] = 250;
 
Share this answer
 
v2
Comments
Nelek 2-Sep-14 5:14am    
If you post code, please do it using the "code" widget and the respective language of the dropdown. It is better than to use bold.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900