When MinValue RadNumericTextBox postback even if no change

5 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 02 Oct 2009 Link to this post

    Hello,

    I discovered that my radNumericTextBoxs postback when user try to decrease the value under the minimum, even if the result is no change in value.
    How could we avoid this, it should not postback if no change occurs in the displayed value, it has great network cost on my app.

    Is this a bug, should I open a ticket

    Thanks for help.
    CS
  2. Martin
    Admin
    Martin avatar
    811 posts

    Posted 07 Oct 2009 Link to this post

    Hello Christian,

    You are correct that the RadNumericTextBox postbacks when AutoPostBack="true" and the user enters a value that is out of the valid range. However you can change this behavior using both OnValueChanging or OnValueChanged events with the following code as an event handler:

    function ValueChanged(sender, args) 
                { 
                    if (args.get_newValue() < sender.get_minValue()) 
                    { 
                        args.set_cancel(true); 
                    } 
                } 


    You can learn more about those events in the following help topics:

    OnValueChanging

    OnValueChanged

    I hope this helps.

    Regards,
    Martin
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 07 Oct 2009 Link to this post

    Hello Martin,

    Thanks for answer, the default behavior should be to not post when nothing change, and we should not be obliged to add again 2 lines of javascript: my pages are full of theses javascript corrections.
    May I request a change for this.

    Anyway thanks

    CS
  5. Martin
    Admin
    Martin avatar
    811 posts

    Posted 12 Oct 2009 Link to this post

    Hello Christian,

    To avoid using the Javascript approach as per my last post please log into your account and download the latest internal build of the controls or just click here. Then set AllowOutOfRangeAutoCorrect="false" of the RadNumericTextBox control. This setting will prevent the the unwanted postback when invalid value is entered.

    I hope this helps.

    Greetings,
    Martin
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 12 Oct 2009 Link to this post

    Hi Martin,
    Hyper massive reaction, thanks.

    CS
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017