AutoFillNumberGroupSeparators not very useful?

4 posts, 0 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 09 Mar 2017 Link to this post

    If I have user input that could be 0-10,000 and I want the comma to appear "AS THEY TYPE" not before they type the value 9094 ... I can't accomplish this using Mask "#4.0" with AutoFillNumberGroupSeparators.

    In a Mask "#4.0" and AutoFillNumberGroupSeparators="True" and the user inputs value "12" what they see is " , 12" which is very confusing to an end user - comma in front of the number??.  

    In a Mask "#4.0" and AutoFillNumberGroupSeparators="False" and the user inputs value "12" what they see is "12" ... this is good, BUT, and this is a big BUT, if the user enters "9094" what they see is "9094" with NO comma.

    The appearance of the comma when AutoFillNumberGroupSeparators="True" should ONLY happen IF the user has enter sufficient digits (i.e. 4) such as to require a comma for thousands separator.  The current behavior of AutoFillNumberGroupSeparators is frankly not useful at all.  

    I guess my questions:

    1.  Is this a bug?

    2.  If this is "by design" is there some alternative that would work the way I described above? (which is how my end users would like to see it)

    Cheers, Rob.

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2127 posts

    Posted 14 Mar 2017 Link to this post

    Hello Rob,

    Thanks for sharing your thoughts.

    The property autofills the separator even if you have no value, and currently this is expected. As for your requirement, you can achieve it using no-mask and a dynamic FormatString. You can find such example in our SDK projects repository. Please check it out and let me know if it helps.


    Regards,
    Martin
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 15 Mar 2017 in reply to Martin Ivanov Link to this post

    HI Martin,

    Does your suggestion still prevent the end user from inputting Alpha characters?  I thought the mask setting is what forced numeric input only?

    Cheers, Rob.

  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2127 posts

    Posted 20 Mar 2017 Link to this post

    Hello Rob,

    Actually, the RadMaskedNumericInput control in general restricts the user to input alphabetical characters. The Mask restricts only the pattern of the entered number. For example, digit, decimal, currency, etc. You can check the numeric format codes in the Mask Tokens help article.

    In scenario with RadMaskedTextInput you can restrict the user from entering alpha characters using the Mask property.

    Regards,
    Martin
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top