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

RadNumericTextbox

3 Answers 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gopinath
Top achievements
Rank 2
Gopinath asked on 07 Mar 2012, 11:35 AM
HI,

This is with reference to the below thread

http://www.telerik.com/community/forums/aspnet/input/change-max-value-of-radnumerictextbox.aspx

I know that RadNumericTextbox has a limitation of 2^46 but is it possible to turn-off the automatic rounding to the maximum value allowed. I don't want the user to automatically be rounded to the maxvalue if the entered value is larger. Instead, I want to signal the user about the error, and ask him/her to retype the value.

can anyone please help me in this

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Mar 2012, 08:01 AM
Hello Gopinath,

Try setting AllowOutOfRangeAutoCorrect to false to avoid showing the Max Value and you can show the error message in a Label as shown below
ASPX:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" AllowOutOfRangeAutoCorrect="false">
     <ClientEvents OnError="OnError" />
     <ClientEvents OnFocus="OnFocus" />
 </telerik:RadNumericTextBox>
 <asp:Label ID="lbl1" runat="server" Text=" "></asp:Label>
JS:
<script type="text/javascript">
var lbl = document.getElementById("lbl1");
function OnError(sender, args)
{
  lbl.innerHTML = "ReType";
}
function OnFocus(sender, args)
{
 lbl.innerHTML = "";
}
</script>

Thanks,
Princy.
0
Gopinath
Top achievements
Rank 2
answered on 12 Mar 2012, 12:41 PM
Thanks Princy. I tried putting that attribute you suggested but still the value is getting re-set to 10000000000000000000. Without this attribute it was resetting to 70368744177664. Please let me know if we can avoid resetting to any value.

Thanks
Gopinath
0
Richard
Top achievements
Rank 1
answered on 14 Mar 2012, 04:28 PM
Gopinath:

You also have the options of using the RadMaskedTextBox control, or trying to implement your own parsing functionality using javascript, which is more difficult that the first option would be.
 
You can reference the following online demo:  Input/First Look.
 
Hope this helps!
Tags
General Discussions
Asked by
Gopinath
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Gopinath
Top achievements
Rank 2
Richard
Top achievements
Rank 1
Share this question
or