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

Restrict - and + signs

1 Answer 40 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Alexey Oyun
Top achievements
Rank 1
Alexey Oyun asked on 29 Oct 2010, 01:37 PM
Hi,

I need to restrict - signs in numericupdown control. I want to allow entering only positive integer. Using minvalue = 0 is not good since it resets to 0 only when control looses focus. But if control used in wizard, and user clicks "OK" he will not notice that -100 he entered actually saved as 0.

Is there any thoughts?
Right now I am not using MinValue, but instead validating on ViewModel. So if user enters -100 user will see validation error. It would be more user friendly if I could just restrict incorrect values.

Thanks, Alexey.

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 04 Nov 2010, 08:34 AM
Hello Alexey,

Thank you for contacting us.

Unfortunately, there is no build in way to restrict entering wrong values in the NumericUpDown control.
The validation approach you chose is the best one in this scenario.

If you have any other questions about our controls please feel free to contact us again.

Greetings,
Konstantina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
NumericUpDown
Asked by
Alexey Oyun
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or