Floating Window Currency Symbol Changes

2 posts, 0 answers
  1. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 29 Sep 2012 Link to this post


    Ever since upgrading to the latest release of the WPF libraries (Q2 2012) I am experiencing issues with the currency format in my RadGridView. My PC is set to en-GB but the application was reporting values back in en-US.

    I managed to overcome the issue by setting the following code in each of my windows & pages:

    //Set Language
    this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);

    However, I have just stumbled across another issues.
    I have a radgridview hosted in a RadDocking pane. When the pane is docked the currency reported in my cells are as they should be, en-GB (£). When the pane becomes floating, the grid cells switch back to en-US ($).

    Do you know how I can prevent the culture of my pane from switching when it becomes floating?

    Thank you for your time,


  2. Yana
    Yana avatar
    4604 posts

    Posted 04 Oct 2012 Link to this post

    Hello Robert,

    The reason for this behavior is that when the pane is floated state, it is hosted in a ToolWindow, which actually is not part of the visual tree of the MainWindow anymore. You should manually set its Language property - subscribe to PaneStateChange event of the Docking and in the event handler add the next snippet:

    private void docking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)
        var pane = e.OriginalSource as RadPane;
        if (pane.IsFloating)
            var window = pane.GetParentToolWindow();
            window.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);

    Hope this helps.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top