Restrict the maxlenght number

4 posts, 0 answers
  1. David Cardona
    David Cardona avatar
    20 posts
    Member since:
    Mar 2010

    Posted 13 Apr 2011 Link to this post

    Hello.

    I see that this control has the property "Maximum" but I need specify a MaxLenght number value, for example a max lenght of three digits only must to allow entry a number with  ###  format.

    May you help me?
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 15 Apr 2011 Link to this post

    Hello David,

    Please, check our online help article of RadNumericUpDown on Formatting. You can use NumberFormatInfo.NumberDecimalDigits to control the display value of RadNumericUpDown.

    Best wishes,
    Dani
    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
  3. DevCraft banner
  4. David Cardona
    David Cardona avatar
    20 posts
    Member since:
    Mar 2010

    Posted 15 Apr 2011 Link to this post

    Hello Dani,

    The NumberDecimalDigits  only allow specify the Decimal format, I need to limit the integer part of a number.

    Thank you
  5. Dani
    Admin
    Dani avatar
    848 posts

    Posted 20 Apr 2011 Link to this post

    Hi David,

    It is not possible to limit the input of RadNumericUpDown at the time it is being input. You can use the Minimum and Maximum properties to limit the RadNumericUpDown value when the user has finished editing. And you can wire up some DataValidation logic as shown in this online example.

    To accomplish the input length validation, I would suggest that you try using the RadMaskedInputTextBox, instead.

    I hope this helps.

    Regards,
    Dani
    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