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

RadNumericTextbox defaulting to MaxValue on postback despite setting AllowOutOfRangeAutoCorrect to false

1 Answer 42 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Condorito asked on 26 Jun 2014, 03:08 PM

I have a form with three controls.  One a RadNumericTextbox with a MaxValue of 6, a dropdown and a button.  The MaxValue of the numeric textbox changes depending on what is selected under the dropdown, and this works fine.  The problem I'm having is that even though I have the numeric textbox's property AllowOutOfRangeAutoCorrect set to false, when submitting the form it sometimes defaults the value to the original MaxValue of 6.  

Here is how to duplicate issue (happens every time):

1. Enter 2 under numeric textbox
2. Click "Get Quote" button, which submits the form
3. Change dropdown value from "Pallet" to "Other"
4. Enter 10 under numeric textbox
5. click "Get Quote" again
6. Numeric Textbox's value switches from 10 to 6.

I am using the Telerik Controls version of 2014.1.403.35

Below is my form, no server-side logic is required:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestRadNumericTextbox.aspx.vb" Inherits="TestRadNumericTextbox" %>
<!DOCTYPE html>
<head runat="server">
      <telerik:RadCodeBlock runat="server" ID="rcbJavascript">
        <script type="text/javascript">
            function rddlItemQtyUOM_OnClientSelectedIndexChanged(sender, eventArgs) {
                var selectedValue = sender.get_selectedItem().get_value();
                var rntbItemQty = $find("<%= rntbItemQty.ClientID%>");
            if (selectedValue == 'Pallet') {
            else {
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <telerik:RadAjaxManager ID="ramMain" runat="server" DefaultLoadingPanelID="ralpDefault" >
            <telerik:AjaxSetting AjaxControlID="btnGetQuote">
                    <telerik:AjaxUpdatedControl ControlID="LTLUI" UpdatePanelCssClass=""  LoadingPanelID="ralpDefault"/>
        <telerik:RadSkinManager runat="server" ID="rskmMain" Skin="Windows7" ShowChooser="false" />
        <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all" EnableRoundedCorners="false">
        <telerik:RadAjaxLoadingPanel ID="ralpDefault" runat="server" Height="75px" Width="75px" />
        <div id="LTLUI" runat="server" >
                <telerik:RadNumericTextBox runat="server" ID="rntbItemQty" Width="48px" NumberFormat-DecimalDigits="0" EmptyMessage="Required Field" MinValue = "1" MaxValue="6"  AllowOutOfRangeAutoCorrect="false"   />
                                                                    <asp:RequiredFieldValidator runat="server" ID="rfvrntbItemQty" ValidationGroup="InputArea" Display="Dynamic" Text="" ControlToValidate="rntbItemQty"  />
                <telerik:RadDropDownList runat="server" ID="rddlItemQtyUOM"  Width="66px" OnClientSelectedIndexChanged="rddlItemQtyUOM_OnClientSelectedIndexChanged">
                        <telerik:DropDownListItem Value="Pallet" Text="Pallet" />
                        <telerik:DropDownListItem Value="Other" Text="Other" />
            <telerik:radbutton runat="server" id="btnGetQuote" Text="Get Quote" CausesValidation="true"  ValidationGroup="InputArea" Width="500px" />

1 Answer, 1 is accepted

Sort by
Maria Ilieva
Telerik team
answered on 01 Jul 2014, 02:02 PM
Hello Juan,

It appears that the presented behavior is a bug with the RadNumericTextBox control. I already logged it in our tracking system and pour Dev team will do the best to fix it as soon as possible.
As a token of gratitude for sharing this issue you could find your Telerik points updated.

Maria Ilieva

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.

Asked by
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question