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

Rad Numeric Textbox

2 Answers 262 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ana
Top achievements
Rank 1
Ana asked on 02 Jul 2014, 12:36 AM
Hi,

I set maxlength of Numeric textbox to 16 as I want to limit the number of characters to be entered. And maxvalue as 9999999999999999  (16 characters).
But, when I entered 16 characters into it, it is reverting the number back to 9999999999999999. How can I save 16 entered numbers as is and restrict to revert back?

Thank you.

2 Answers, 1 is accepted

Sort by
0
Ana
Top achievements
Rank 1
answered on 02 Jul 2014, 12:50 AM
Below is my aspx code.

​<telerik:RadNumericTextBox ID="CustomerId" Runat="server" MaxLength="16" MaxValue="9999999999999999" MinValue="0" Type="Number">
<numberformat decimaldigits="0" groupseparator="" /></telerik:RadNumericTextBox>

The text entered is 1234567891234567.   It is saving as 1.23456789123457E+15 
                                       
0
Viktor Tachev
Telerik team
answered on 04 Jul 2014, 03:06 PM
Hello Ana,

Please note that the RadNumericTextBox supports values that are between -2^46 and +2^46. Setting the MinValue and MaxValue properties outside that range could result in unexpected behavior from the RadNumericTextBox. If you would like additional information on the control, you would find this article interesting.

This said, if you would like to have an input control that allows the user to enter a number that would be less or equal to 16 digits, try using the RadMaskedTextBox. Check the sample markup below and see if it works for you:

<telerik:RadMaskedTextBox runat="server" ID="RadMaskedTextBox1" Mask="################"></telerik:RadMaskedTextBox>


Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Ana
Top achievements
Rank 1
Answers by
Ana
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or