Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > NumericUpDown > MaxLength for RadNumericUpDown

Not answered MaxLength for RadNumericUpDown

Feed from this thread
  • Lauren Nickerson avatar

    Posted on Jul 13, 2009 (permalink)

    Hello, is it possible to set a MaxLength to the RadNumericUpDown so the user can't input more than the allowed number? (Exactly like the WPF TextBox), I tried the code below but it didn't work since ContentText is readonly:

    private

     

    void textBoxWidth_KeyDown(object sender, KeyEventArgs e)

     

    {

     

        if (textBoxWidth.ContentText.Length > 1)

     

        {

            textBoxWidth.ContentText = 9;

            textBoxWidth.Value = 9;

        }

    }

    Thanks.

    Reply

  • Hristo Borisov Hristo Borisov admin's avatar

    Posted on Jul 16, 2009 (permalink)

    Hello Lauren Nickerson,

    Why would you need this functionality? If you have specified the number of digits of your input for example to 2, which is the default behavior, your value won't be rounded to this precision. Would you explain in more details the reason you want to constrain the text, so we can evaluate your scenario for a possible feature. Thank you for contacting us and we look forward to receiving your feedback.

    All the best,
    Hristo Borisov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

  • Sav avatar

    Posted on Dec 8, 2011 (permalink)

    Hello...

    It would be goog, if lenght could be set and Its not about rounding. Firstly, it looks good when user cannot exceed lets say four digit number, because width is set and longer text will start to hide. Ther other thing is, that you may accidentally enter one extra digit beyond digit number of maximum value. The result is that if wanted to enter for example 333, and by mishap entered 3333, the value automaticaly jumps to maximum which is somthing like 999 or whatever else. User might miss that change, especially when lost focus is due to 'Submit' button click...      

    So I would add that funcionality. 


    Bye.

    Reply

  • Boyan Boyan admin's avatar

    Posted on Dec 12, 2011 (permalink)

    Hello Sav,

    Thank you for your feedback. You are right that sometimes this is a little bit confusing and not very user friendly. I have logged your request in our PITS system with ID8833. You can follow its progress and vote for this feature.

    As a workaround you can use RadMaskedTextBox if you don't need the up and down arrows, there you can use a mask with fixed number of digits.

    All the best,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > NumericUpDown > MaxLength for RadNumericUpDown
Related resources for "MaxLength for RadNumericUpDown"

WPF NumericUpDown Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]