Column Specific Culture

12 posts, 0 answers
  1. Kevin Hendriks
    Kevin Hendriks avatar
    56 posts
    Member since:
    Feb 2009

    Posted 11 Jul 2011 Link to this post

    I have develop a program that will be used in different countries.
    We want everyone to work with date's and so on in there own culture settings.
    On the other hand we can view Currency info from the differen countries. These are show in the same datagrid. I want these values to Show the right info So Euro for most Europe countries and Dollar for America.
    It is only possible to select On country at a time.

    Currently I am using

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding TurnOver}" Header="Value" IsReadOnly="True" DataFormatString="{}{0:C}" >

    <telerik:GridViewDataColumn.AggregateFunctions>

    <telerik:SumFunction ResultFormatString="{}{0:C}" />

    </telerik:GridViewDataColumn.AggregateFunctions>

    </telerik:GridViewDataColumn>

    How do I make it so that the rigth currency symbol and format is made on the selected country while keeping the rest of the UI the users culture setting.

    This question is also for the Chart area where I use

    <

    telerik:SplineSeriesDefinition ShowItemLabels="False" ShowItemToolTips="True"

    ItemToolTipFormat="Intake: #DATAITEM.Intake{C2}&#x0a;Target: #DATAITEM.Target{C2}&#x0a;Turn Over: #DATAITEM.TurnOver{C2}&#x0a;Maintenance: #DATAITEM.Maintenance{C2}"/>

     

     

     

     

  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 11 Jul 2011 Link to this post

    Hi Kevin Hendriks,

    I have prepared an example project that illustrates how to maintain several columns with different culture setting in one application. Please, refer to it and let me know whether this approach meets your requirements.

    Best wishes,
    Ivan Ivanov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for WPF is Visual Studio 2017 Ready
  4. Kevin Hendriks
    Kevin Hendriks avatar
    56 posts
    Member since:
    Feb 2009

    Posted 12 Jul 2011 Link to this post

    Hello,

    The solution you provided does work for cells. but is does not seem to work for aggregate functions.
  5. Sha
    Sha avatar
    7 posts
    Member since:
    Nov 2012

    Posted 15 Nov 2012 Link to this post

    I have the same situation with Kevin Hendriks.
    I just want to show total currency depend on culture when call telerik:SumFunction. But I dont know how to do that when Culture is not property of SumFunction. If it have Culture property, I want to Binding a value from my viewmodel to that property.
  6. Sha
    Sha avatar
    7 posts
    Member since:
    Nov 2012

    Posted 15 Nov 2012 Link to this post

    Admin... any ideas for this...

    I really need a solution for setting Culture on telerik:SumFunction.

    Ex:
    - when i set en-US , it will show 2,000,000.00 on SumFunction result.
    - when i set fr-FR , it will show 2 000 000,00 on SumFunction result.
  7. Sha
    Sha avatar
    7 posts
    Member since:
    Nov 2012

    Posted 17 Nov 2012 Link to this post

    Dear Admin,

    I really need your support for this matter, but it's so silent in here...

    Your product telerik:SumFunction have supported ResultFormatString... why not support Culture...
    So how can i find a properly solution even though Telerik does not have any answer for this... ???

    Please give me an answer...
  8. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 19 Nov 2012 Link to this post

    Hello Sha,

    I might be missing something here, but based on the information that you provided, when you change the culture from en-Us to fr-Fr, the format of the aggregate is changed. Could you clarify what is the exact problem ? Isn't that the behavior you require - to be able to change the format of the string displayed in the footer ?
    Furthermore, if you want to customize the footer, you could try following the approach illustrated in this demo

    All the best,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  9. techshop
    techshop avatar
    1 posts
    Member since:
    Jul 2006

    Posted 09 May 2013 Link to this post

    Hi, this example stoped working at 2013. Is there anything I can do to achieve the same results with the new bits?

    Thanks.
  10. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 09 May 2013 Link to this post

    Hi Edson,

     
    Could you set IsLocalizationLanguageRespected property of RadGridVIew ? Do you get the same results ?

    All the best,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  11. Diego Modolo
    Diego Modolo avatar
    1 posts
    Member since:
    May 2013

    Posted 09 May 2013 Link to this post

    Hi Maya, I've set the IsLocalizationLanguageRespected, but no matter what value it has the behavior is the same.
    That's actually the only thing I've changed in the Project, besides changing the assemblies to the newer version.

    Is there anything else I could do?

    Thanks,
  12. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 14 May 2013 Link to this post

    Hello Diego,

    Indeed, you are absolutely right. I will investigate the case and let you know once I have more information on the issue. For the time being, a possible workaraound is the set the language after the grid set it to the TextBlock. For example:

    XAML:
     
     <telerik:GridViewDataColumn DataMemberBinding="{Binding RevenueEUR}" >
                        <telerik:GridViewDataColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding RevenueUSD, StringFormat={}{0:C}}" xml:lang="DE" Loaded="TextBlock_Loaded"/>
                            </DataTemplate>
                        </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
     
    Code-behind:
     
            private void TextBlock_Loaded(object sender, RoutedEventArgs e)
            {
                (sender as TextBlock).Language = System.Windows.Markup.XmlLanguage.GetLanguage("de");
            }
     

    Regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  13. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 03 Jun 2013 Link to this post

    Hi Diego,

    I have resolved the issue, but as it turns out the fix will not manage to go with the official release. However, it will be available in the first internal build after that.
    Thank you for reporting the issue, I have updated your telerik poitns. 

    Regards,
    Maya
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready