I need to display the large number in exponential notation format.
When I enter more than 15 digit number which is "12345678901234567890" into the RadNumericTextBox
Value automatically gets rounded as 12345678901234560000.(Zero at the end) which is wrong.
But,
When I enter more than 21 digits number "1234567890123456789012"
then the value gets displayed as "1.234567890123457e+21" which is working perfectly
So the problem is in between the range 16 - 21 Digits.
Please help to resolve this problem.
Using IE.9,Chrome,Firefox
VS2012
Telerik version : 2014.1.416.40
My Code
<telerik:RadNumericTextBox Width="100px" ID="txtTest" EmptyMessage="Test" ShowSpinButtons="false" DisplayText="" Type="Number" runat="server" InvalidStyleDuration="100"> <NumberFormat AllowRounding="false" GroupSeparator="" DecimalDigits="15" KeepNotRoundedValue="true" /> <ClientEvents OnKeyPress="keyPress" OnValueChanged="valueChanged" /></telerik:RadNumericTextBox>Telerik.Web.UI.RadNumericTextBox.prototype._compileRegEx = function () { var regexDecimalSeparator = this.get_numberFormat().DecimalSeparator == "." ? "\\." : this.get_numberFormat().DecimalSeparator; this._acceptRegExp = new RegExp("[e0-9" + regexDecimalSeparator + this.get_numberFormat().NegativeSign + "]{1}"); this._rejectRegExp = new RegExp("[^e0-9" + regexDecimalSeparator + this.get_numberFormat().NegativeSign + "]{1}", "g"); this._decimalReplaceRegExp = new RegExp(regexDecimalSeparator, "g"); }; var orgNegativeSign = ""; function keyPress(sender, args) { if (args.get_keyCode() == 45) { orgNegativeSign = sender.get_numberFormat().NegativeSign; sender.get_numberFormat().NegativeSign = "~"; } } function valueChanged(sender, args) { if (orgNegativeSign != "") { sender.get_numberFormat().NegativeSign = orgNegativeSign; orgNegativeSign = ""; } }