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

AutoFillNumberGroupSeparators not very useful?

3 Answers 22 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 10 Mar 2017, 12:29 AM

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.

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 14 Mar 2017, 05:15 PM
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.
0
Rob Ainscough
Top achievements
Rank 1
answered on 15 Mar 2017, 09:40 PM

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.

0
Martin Ivanov
Telerik team
answered on 20 Mar 2017, 01:25 PM
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.
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Rob Ainscough
Top achievements
Rank 1
Share this question
or