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

Digit grouping symbol in regional settings

8 Answers 264 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jodok
Top achievements
Rank 1
Jodok asked on 31 Oct 2012, 09:17 AM
Hello

My regional setting is set to German (Switzerland), which is using an apostrophe " ' " as digit grouping symbol.
In the attached two images you can see, that the correct grouping symbol is shown in case of a label, but in the RadGridView a comma is shown instead. I'm using the latest control for WPF (2012.3.1017.40) on a Windows 7 machine.

Do I have to set the regional settings explicilty somewhere, or what can I do to make sure the correct digit grouping symbol is shown?

Best regards, Jodok

8 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 31 Oct 2012, 10:27 AM
Hi Jodok,

I guess that the reason for this behaviour is that now the Culture used for formatting the GridView is the one specified as a Language for it or for the containing Window. We have changed the behaviour of the GridView concerning culture settings to be consistent with the one for the DataGrid. You should set the Language property to be the CurrentCulture and the GridView will be formatted based on it.

You could check the Q3 Release Notes here

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jodok
Top achievements
Rank 1
answered on 31 Oct 2012, 11:16 AM
Hi Didie,

thanks for the tip! What I ended up with is actually overwriting the XmlLanguage on application start.
Here's my code in the static app constructor:
static App() {
    FrameworkElement.LanguageProperty.OverrideMetadata(
        typeof(FrameworkElement),
        new FrameworkPropertyMetadata(System.Windows.Markup.XmlLanguage.GetLanguage(System.Threading.Thread.CurrentThread.CurrentCulture.IetfLanguageTag)));
}

Best regards, Jodok




0
Pavel
Top achievements
Rank 1
answered on 06 Feb 2013, 10:43 AM
It's a big mistake to follow well-known buggy behavior in MS controls. Your workaround with Language property works bad if user changes settings of default locale. For example, user can change decimal separator symbol or currency in OS settings leaving rest of the settings unchanged. Language property allows to use only default culture settings and all customized settings will not be used. It's very bad. And this is a breaking change, of course. Could you introduce an option to switch between old and new behaviors here?
0
Dimitrina
Telerik team
answered on 06 Feb 2013, 12:44 PM
Hello,

Indeed, you are right.

The good news is that we have recently introduced a new property of the RadGridView 
IsLocalizationLanguageRespected so that you can use it to specify whether you want the CurrentCulture to be directly respected or not. By default the Language is respected.

You can download the LIB in order to benefit from this new property.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
hvduc
Top achievements
Rank 1
answered on 25 Mar 2013, 01:41 AM
Hi Telerik,
I met the same error and set IsLocalizationLanguageRespected property to False after upgrading Telerik controls to Q1 2013.
But my application is crashed wherever a form with RadGridView is showed. I tried debugging this error but there is no exception when in debugging.
Can you fix this error soon?
0
Dimitrina
Telerik team
answered on 25 Mar 2013, 08:39 AM
Hello,

I am not able to reproduce such an issue. Would you please confirm that having the same configuration without setting this new property, the GridView shows properly? 

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Alexander
Top achievements
Rank 1
answered on 28 May 2013, 03:00 PM
I have stack overflow exception when setting IsLocalizationLanguageRespected to false in Silverlight.
I have that in constructor of a subclass of RadGridView.
0
Maya
Telerik team
answered on 31 May 2013, 08:03 AM
Hi Alexander,

We have discovered a bug when setting IsLocalizationLanguageRespected property to "false" and the fix will be available most probably in one of the internal builds as it is not fully tested so that to be released with Q2 2013.
Nevertheless, could you provide a bit more details on how you get the exception so that I can test it on my side to see whether this case is covered with the fix as well ?  

Regards,
Maya
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Jodok
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Jodok
Top achievements
Rank 1
Pavel
Top achievements
Rank 1
hvduc
Top achievements
Rank 1
Alexander
Top achievements
Rank 1
Maya
Telerik team
Share this question
or