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

Converter value format region?

1 Answer 21 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Antti Simonen
Top achievements
Rank 1
Antti Simonen asked on 30 Jan 2014, 08:56 AM
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!

1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 04 Feb 2014, 08:44 AM
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.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
Tags
PivotGrid
Asked by
Antti Simonen
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or