Digit grouping symbol in regional settings

9 posts, 1 answers
  1. Jodok
    Jodok avatar
    2 posts
    Member since:
    Jan 2012

    Posted 31 Oct 2012 Link to this post

    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
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 31 Oct 2012 Link to this post

    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.

  3. Jodok
    Jodok avatar
    2 posts
    Member since:
    Jan 2012

    Posted 31 Oct 2012 Link to this post

    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




  4. Pavel
    Pavel avatar
    19 posts
    Member since:
    Nov 2011

    Posted 06 Feb 2013 Link to this post

    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?
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 06 Feb 2013 Link to this post

    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.

  6. hvduc
    hvduc avatar
    33 posts
    Member since:
    Jun 2010

    Posted 24 Mar 2013 Link to this post

    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?
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 25 Mar 2013 Link to this post

    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.

  8. Alexander
    Alexander avatar
    11 posts
    Member since:
    Aug 2011

    Posted 28 May 2013 Link to this post

    I have stack overflow exception when setting IsLocalizationLanguageRespected to false in Silverlight.
    I have that in constructor of a subclass of RadGridView.
  9. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 31 May 2013 Link to this post

    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.

Back to Top