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

Numeric Range Validation Issue

2 Answers 91 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Tirumala Manikanta
Top achievements
Rank 1
Tirumala Manikanta asked on 29 Oct 2015, 07:30 PM

Hi,

 When we set the Numeric Range validation as (2 - 10) using MaskedInputExtensions, we are not able to enter 10 in the textbox. We need to enter 9 and then press up arrow to input 10. Please suggest how to solve this issue.

        <telerik:RadMaskedNumericInput Height="23" Width="200" maskedInput:MaskedInputExtensions.Maximum="10" maskedInput:MaskedInputExtensions.Minimum="2"/>​

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 03 Nov 2015, 03:53 PM
Hi Tirumala Manikanta,

Basically every time you enter a number the Value property of the MaskedNumericInput will be updated. You can setting the UpdateValueEvent property to "LostFocus".
<telerik:RadMaskedNumericInput Height="23" Width="200"
        UpdateValueEvent="LostFocus"
                maskedInput:MaskedInputExtensions.Maximum="10"
                maskedInput:MaskedInputExtensions.Minimum="2"/>​
This way the Value will be updated after you lose focus from the RadMaskedNumericInput control. If you enter a wrong value (exceeding the minimum and maximum)  the control will rollback to the last valid one.

You can check also our Throwing Validation Exceptions and Using DataAnnotation Attributes articles.
They can show you other ways of limiting your user input double number. 

If you have any other questions regarding Telerik controls, please don't hesitate to contact us.

Regards,
Dinko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Tirumala Manikanta
Top achievements
Rank 1
answered on 03 Nov 2015, 05:02 PM

Hi Dinko,

 Setting UpdateValueEvent="LostFocus" solved the issue. Thanks.

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Tirumala Manikanta
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Tirumala Manikanta
Top achievements
Rank 1
Share this question
or