Restrict - and + signs

2 posts, 1 answers
  1. Alexey Oyun
    Alexey Oyun avatar
    74 posts
    Member since:
    Mar 2010

    Posted 29 Oct 2010 Link to this post


    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.
  2. Answer
    Konstantina avatar
    2332 posts

    Posted 04 Nov 2010 Link to this post

    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.

    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
Back to Top