We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Integer TextBox won''t accept input

I use an Integer TextBox to enter the year in a form. allowed values: 1900-2005. This worked when using version 3.0.1.6. Just upgraded to 3.2.1.0, to correct another issue. Now, I can not edit any digit in the TextBox if the resulting number would be out of the valid range, even while focus is still in the TextBox control. So, if I have a default value of "1900" and want to enter "2005", I can not change the left-most digit from a 1 to a 2, although I can change either of the right-most digits. Has anyone seen this, and is there a work-around?

3 Replies

AD Administrator Syncfusion Team August 1, 2005 03:37 PM UTC

Hi Peter, The reason the behavior changed from v3.0.1.6 to v3.2.1.0 is that there was a bug in v3.0 that prevented the minimum value from being enforced. The new behavior is the correct behavior. We realize that it has limitations, but we have considered the alternatives and this is the best option. Please refer to the Resolution section of Defect #318 for a more detailed explanation. Regards, Gregory Austin Syncfusion Inc.


PE Peter August 1, 2005 04:19 PM UTC

The resolution example provided, going from -90 to -70 worked because no intermediate value outside the validation limits of -90 to -50 was needed. This is not possible (in my example)when replacing 1900 with 2005, since value limits are 1900 and 2100, making intermediate values go out-of-range. Appears the programmer must increase the max/min limits and write an extra validation handler to be called when focus exits the textbox.


AD Administrator Syncfusion Team August 1, 2005 10:21 PM UTC

Hi Peter, Yes, in a situation like yours using the built-in validation support in .NET and setting the minimum value to 0 is the best option. Regards, Gregory Austin Syncfusion Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon