Converter value format region?

2 posts, 0 answers
  1. Antti Simonen
    Antti Simonen avatar
    2 posts
    Member since:
    Apr 2006

    Posted 30 Jan 2014 Link to this post

    Hi, I am using Silverlight PivotGrid and I have defined my own CellTemplate where I have just one TextBlock so that I can hook up a converter to the value. In the converter code I get the cell data value just fine but my question is that what region setting the PivotGrid uses to format the value? 

    In my case, I get e.g. 10000,00
    comma as decimal separator and no thousand separators. I'd like to parse this to decimal but to do that, I need to know what region setting I should use to parse it, or can it change depending on the client machine settings? It doesn't seem to follow the region setting I have set for the Thread.CurrentThread.CurrentCulture.

    Thanks already!
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 04 Feb 2014 Link to this post

    Hello Antti,

    RadPivotGrid shows the values based on the current users settings defined in Control Panel. If you want to conert the values, I suggest you to use CultureInfo.InvariantCulture, or the culture that is passed to the converter. This way you will persist the values in the same culture as the one that user is using.

    I've prepared a sample project to demonstrate one possible approach. Hope this helps.

    Rosen Vladimirov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft R3 2016 release webinar banner
Back to Top