This is a migrated thread and some comments may be shown as answers.
Replace thousands separator
5 Answers 72 Views
This is a migrated thread and some comments may be shown as answers.
Jiri
Top achievements
Rank 1
Jiri asked on 05 Jun 2014, 01:29 PM
Hi,

I am usin RadNumericUpDown for editing of year, but i have problem with thousands separator. my problem is, that year is displayed as 2 014 (with whitespace), but I need 2014. Is there any way how to achieve that?

Thank you.

5 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 06 Jun 2014, 07:45 AM
Hello Jiri,

In order to remove the white space, you will have to set the NumberGroupSeparator property of the NumberFormatInfo to an empty string, for example:

<telerik:RadNumericUpDown x:Name="RadNumericUpDown" IsInteger="True">
   <telerik:RadNumericUpDown.NumberFormatInfo>
     <culture:NumberFormatInfo
                NumberGroupSeparator="" />
   </telerik:RadNumericUpDown.NumberFormatInfo>
</telerik:RadNumericUpDown>

Hope this helps.


Regards,
Konstantina
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
AF
Top achievements
Rank 1
answered on 17 Jul 2014, 01:34 PM
Hi Konstantina,

On your solution,

[quote]
<telerik:RadNumericUpDown x:Name="RadNumericUpDown" IsInteger="True">
   <telerik:RadNumericUpDown.NumberFormatInfo>
     <culture:NumberFormatInfo
                NumberGroupSeparator="" />
   </telerik:RadNumericUpDown.NumberFormatInfo>
</telerik:RadNumericUpDown>
[/quote]

how did you define the 'culture' prefix? It would be very usefull if you could explain it, this is the best workaround I could find so far but this doesn't work if i don't define the prefix first.

Thanks.
0
Konstantina
Telerik team
answered on 18 Jul 2014, 10:59 AM
Hello,

The NumericUpDown control takes all the formatting information it needs from the culture setting of your machine or application, if they are set explicitly. If the used culture has the same setting, then it won't be needed the NumberGroupSeparator property to be set.

Does this clarify the matter?

Regards,
Konstantina
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Heiko
Top achievements
Rank 1
answered on 02 Jul 2018, 12:55 PM

I know this post is quite old but since Konstantina did not answer what namespace culture is; for future reference:

        xmlns:culture="clr-namespace:System.Globalization;assembly=mscorlib"

0
Martin Ivanov
Telerik team
answered on 03 Jul 2018, 06:13 AM
Hello Heiko,

Thank you for sharing the namespace.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Asked by
Jiri
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
AF
Top achievements
Rank 1
Heiko
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or