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

Column Specific Culture

11 Answers 261 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kevin Hendriks
Top achievements
Rank 1
Kevin Hendriks asked on 11 Jul 2011, 03:05 PM
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}"/>

 

 

 

 

11 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 11 Jul 2011, 03:36 PM
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!

0
Kevin Hendriks
Top achievements
Rank 1
answered on 12 Jul 2011, 08:26 AM
Hello,

The solution you provided does work for cells. but is does not seem to work for aggregate functions.
0
Sha
Top achievements
Rank 1
answered on 15 Nov 2012, 08:16 AM
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.
0
Sha
Top achievements
Rank 1
answered on 15 Nov 2012, 09:58 AM
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.
0
Sha
Top achievements
Rank 1
answered on 17 Nov 2012, 10:19 AM
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...
0
Maya
Telerik team
answered on 19 Nov 2012, 05:06 PM
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.

0
techshop
Top achievements
Rank 1
answered on 09 May 2013, 06:19 PM
Hi, this example stoped working at 2013. Is there anything I can do to achieve the same results with the new bits?

Thanks.
0
Maya
Telerik team
answered on 09 May 2013, 07:18 PM
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.

0
Diego Modolo
Top achievements
Rank 1
Iron
Iron
answered on 09 May 2013, 08:16 PM
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,
0
Maya
Telerik team
answered on 14 May 2013, 03:57 PM
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.

0
Maya
Telerik team
answered on 03 Jun 2013, 12:15 PM
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.

Tags
GridView
Asked by
Kevin Hendriks
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Kevin Hendriks
Top achievements
Rank 1
Sha
Top achievements
Rank 1
Maya
Telerik team
techshop
Top achievements
Rank 1
Diego Modolo
Top achievements
Rank 1
Iron
Iron
Share this question
or