Only show thousands separator when needed

0 Answers 10 Views
MaskedInput (Numeric, DateTime, Text, Currency)
Shawn
Top achievements
Rank 1
Iron
Iron
Shawn asked on 30 Jun 2025, 05:01 PM

Is there a property I can set so that the RadMaskedNumericInput field only shows the thousands separator when the value gets over 1,000? It doesn't look great that the commas appear before the value is high enough to need them.

Martin Ivanov
Telerik team
commented on 03 Jul 2025, 01:33 PM

You can see a similar behavior shown in the following SDK example.
Shawn
Top achievements
Rank 1
Iron
Iron
commented on 09 Jul 2025, 07:28 PM

Unless I'm misunderstanding the linked example, that only effects the numbers to the right of the decimal. However, I want to effect the digits to the left of the decimal since I want to change when the commas are displayed. I've tried manipulating the Mask instead of the StringFormat but it causes the CaretIndex to get messed up every time the Mask is changed.
Martin Ivanov
Telerik team
commented on 14 Jul 2025, 03:31 PM

Actually, you are correct. The example handles the decimal values. However, you can use the custom control implementation to make extra modifications over the masked component's behavior.

I've reviewed the communication so far again and it sounds to me that just an empty mask and a StringFormat of "N0" should do what you need. The N0 should ensure that the number group separator is displayed only when you reach the corresponding value. Please correct me if I am wrong and you need to do something else.

<telerik:RadMaskedNumericInput Mask="" FormatString="N0" UpdateValueEvent="PropertyChanged" />

No answers yet. Maybe you can help?

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Shawn
Top achievements
Rank 1
Iron
Iron
Share this question
or