CurrentCulture Format Settings are not respected
PROBLEM
RadGridView does not respect the CurrentCulture Format settings when formatting its data.
Please note that GridViewCells respect the Language property and the result of the aggregate function, displayed for the GridViewFooterCells, respects the CurrentCulture settings.
CAUSE
It is due to the fact that the culture used for formatting the data is now the one specified as a Language for the GridView (or the containing Page).
We have changed this behavior with the version Q2 2012 SP2, so now it is compatible with the behavior of the MS DataGrid.
SOLUTION
With Q1 2013 we have introduced the IsLocalizationLanguageRespected property of RadGridView, which will enable you to control whether the CurrentCulture or the Language will be respected. It can be configured with the following values:
- "True" - the Language will be respected (default).
- "False" - the CurrentCulture format settings will be respected.
Another approach would be to set the Language based on the CurrentCulture as follows:
public MainPage()
{
InitializeComponent();
Dispatcher.BeginInvoke(new Action(() => this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name)));
}
Public Sub New()
InitializeComponent()
Dispatcher.BeginInvoke(New Action(Sub() Me.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name)))
End Sub