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

When MinValue RadNumericTextBox postback even if no change

4 Answers 75 Views
Input
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 02 Oct 2009, 04:29 PM
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

4 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 07 Oct 2009, 02:50 PM
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.
0
CSurieux
Top achievements
Rank 2
answered on 07 Oct 2009, 02:57 PM
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
0
Martin
Telerik team
answered on 12 Oct 2009, 06:45 AM
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.
0
CSurieux
Top achievements
Rank 2
answered on 12 Oct 2009, 07:57 AM
Hi Martin,
Hyper massive reaction, thanks.

CS
Tags
Input
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Martin
Telerik team
CSurieux
Top achievements
Rank 2
Share this question
or