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

Using the ExportTelerikGridDataUserControl with non-US culture

3 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
HotlineOrbicon
Top achievements
Rank 1
HotlineOrbicon asked on 07 Jun 2011, 02:01 PM
I have a WPF RadGridView with an associated ExportTelerikGridDataUserControl.
Using da-DK culture the XML export shows up in Excell with no decimals on numbers. I can solve this problem by using en-US culture but that has other implications that I cannot accept.
What can I do ?

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 07 Jun 2011, 03:31 PM
Hi Lars,

You may set the CurrentCulture and CurrentUICulture of your application. Thus the grid will be displayed and exported correspondingly to the required settings of this culture:

public MainWindow()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("da-DK");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("da-DK");
 
            InitializeComponent();     
        }
 

Best wishes,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
HotlineOrbicon
Top achievements
Rank 1
answered on 08 Jun 2011, 09:10 AM
The XML export issue arise when using da-DK culture on the thread and although using en-US culture on the thread does solve the XML export issue, it creates other issues. I was hoping for a way to set en-US culture locally on the ExportTelerikGridDataUserControl but other solutions are welcome.
0
Maya
Telerik team
answered on 08 Jun 2011, 12:54 PM
Hello Lars,

Generally, my suggestion was to define the Dutch culture as the default one for your application. Thus, when exporting the grid, the corresponding settings will be applied. Please take a look at the sample attached for a reference. Is this approach not appropriate for you ? If not, may you provide a bit more information about your specific requirements and settings ? Is ExportTelerikGridDataUserControl a custom control deriving from RadGridView ? What is the culture you want to use in your application ? Do you want to change it only when exporting ? 

Greetings,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
HotlineOrbicon
Top achievements
Rank 1
Answers by
Maya
Telerik team
HotlineOrbicon
Top achievements
Rank 1
Share this question
or