This is a migrated thread and some comments may be shown as answers.

Restrict the maxlenght number

3 Answers 117 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
David Cardona
Top achievements
Rank 1
David Cardona asked on 13 Apr 2011, 09:26 PM
Hello.

I see that this control has the property "Maximum" but I need specify a MaxLenght number value, for example a max lenght of three digits only must to allow entry a number with  ###  format.

May you help me?

3 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 15 Apr 2011, 08:41 AM
Hello David,

Please, check our online help article of RadNumericUpDown on Formatting. You can use NumberFormatInfo.NumberDecimalDigits to control the display value of RadNumericUpDown.

Best wishes,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
David Cardona
Top achievements
Rank 1
answered on 15 Apr 2011, 02:46 PM
Hello Dani,

The NumberDecimalDigits  only allow specify the Decimal format, I need to limit the integer part of a number.

Thank you
0
Dani
Telerik team
answered on 20 Apr 2011, 09:24 AM
Hi David,

It is not possible to limit the input of RadNumericUpDown at the time it is being input. You can use the Minimum and Maximum properties to limit the RadNumericUpDown value when the user has finished editing. And you can wire up some DataValidation logic as shown in this online example.

To accomplish the input length validation, I would suggest that you try using the RadMaskedInputTextBox, instead.

I hope this helps.

Regards,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
NumericUpDown
Asked by
David Cardona
Top achievements
Rank 1
Answers by
Dani
Telerik team
David Cardona
Top achievements
Rank 1
Share this question
or