NumericTextBox range problem

2 posts, 0 answers
  1. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 18 Nov 2011 Link to this post

    I have a numeric text box that I set a minimum value of 1 and a maximum value of 99.  If I type 0 into the field the validation fires but it does not clear that 0 out of the text area.  On the OnError event I am trying to clear the value of the textbox but the 0 is still there.

    <telerik:RadNumericTextBox Save="Text" ID="txtFileFormat" runat="server" 
                          MaxValue="99" MinValue="1"
                          Width="25px" TabIndex="1" AllowOutOfRangeAutoCorrect="False" 
                          AutoCompleteType="Disabled" ClientEvents-OnError="FileError">
                          <NumberFormat AllowRounding="False" DecimalDigits="0" />

    function FileError(sender, args) {

    Is there something that I am missing?  Does the OnError event prevent updates to that object?
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 19 Nov 2011 Link to this post


    function ValueChanging(sender, args) {
                    if (args._newValue < sender._minValue) {
                        args._cancel = true;
    <telerik:RadNumericTextBox Save="Text" ID="txtFileFormat" runat="server" MaxValue="99"
           MinValue="1" Width="100px" TabIndex="1" AllowOutOfRangeAutoCorrect="False" AutoCompleteType="Disabled"
            ClientEvents-OnError="FileError" >
            <ClientEvents OnValueChanging="ValueChanging" />
           <NumberFormat AllowRounding="False" DecimalDigits="0" />

    Jayesh Goyani
  3. DevCraft R3 2016 release webinar banner
Back to Top