Replace thousands separator

4 posts, 0 answers
  1. Jiri
    Jiri avatar
    23 posts
    Member since:
    Aug 2013

    Posted 05 Jun 2014 Link to this post

    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.
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 06 Jun 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. AF
    AF avatar
    1 posts
    Member since:
    Apr 2014

    Posted 17 Jul 2014 in reply to Konstantina Link to this post

    Hi Konstantina,

    On your solution,


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


    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.
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 18 Jul 2014 Link to this post

    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.
     
Back to Top