Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maxlength madness
Message
From
11/02/2016 17:11:21
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01631330
Message ID:
01631337
Views:
39
>>>>This winform app uses datatables in typed datasets bound to data entry controls.
>>>>
>>>>I'm getting weird results with the maxlength property of textboxes.
>>>>
>>>>A maxlength of 2 works exactly as you'd expect. You can enter 2 or fewer characters into the textbox.
>>>>
>>>>With maxlength of 5, however, I can only enter 3 characters. In order to enter 5 I must make the maxlength 8.
>>>>
>>>>Character casing is upper, but I can't find anything about that.
>>>>
>>>>Any ideas?
>>>
>>>What is the type and length of the column? Can you also show your code and how do you test it? Are you manually typing?
>>
>>Column is char(5)
>>
>>
>> SetTextBox(TextBoxZip, LeftStart, TextTop, 50, ssprocessds.company, "zip", LabelZip, "Zip");
>>            TextBoxZip.MaxLength = 5;
>>
>>SetTexBox sets the control on the form and does binding.
>>
>>I'm testing it by typing on the form.
>
>Is it only this one textbox on that form? Also, why do you reference company in your code and not zip?

There are dozens of textboxes on the form. company is the datatable. zip is the column.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform