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

Wrong DateTime Localization since 2012 Q2 SP2

4 Answers 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Denny
Top achievements
Rank 1
Denny asked on 20 Sep 2012, 07:47 AM
Hello,

since 2012 Q2 SP2 the RadGridView shows the DateTime Values in en-US culture.
How can I change the the culture back into the machine culture?

4 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 20 Sep 2012, 10:28 AM
Hello,

This behaviour is due to the fact that now the culture used is the one specified as a Language for the containing Window.
You should set the Language property like so (to have the machine culture applied): 

public MainWindow()
{
            InitializeComponent();
            this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);
...
}

Kind regards,
Didie
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Christian
Top achievements
Rank 1
answered on 25 Sep 2012, 08:59 AM
I am glad that you provided a solution in this thread.
Nevertheless it has cost me some time to find it.

As I saw in the forum, this has been a breaking change for many of us developers, so I wonder why this was not marked as such in the release notes.

It would be nice if you note such changes in the release notes
0
Dimitrina
Telerik team
answered on 25 Sep 2012, 09:03 AM
Hi,

You are right that we would mark this better in the Release Notes. Currently we have stated those two lines here:
-> Changing Language property is not respected. 
-> Language property of the parent FrameworkElement is not respected. Changing Language property is not respected. 

The documentation will be updated soon with this information as well.


Regards,
Didie
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Dimitrina
Telerik team
answered on 08 Feb 2013, 04:28 PM
Hello,

In addition to my last answer, I would like to inform you that we have introduced a new property IsLocalizationLanguageRespected of the RadGridView. It is available in our latest internal build. 

Its default value is 'true' meaning that the formatting will be based on the Language property (default behaviour). Once you set it to 'false", then the CurrentCulture will be respected. 

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Denny
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Christian
Top achievements
Rank 1
Share this question
or