This question is locked. New answers and comments are not allowed.
Hello,
with the previous version (.912) of RadGridView, it was easy to change the culture of the application: a single call to
changes the culture for the whole application.
In the last version (.1017), it seems that now the formatting is made in another thread and that the culture is no more taken into account!
If you create a new Silverlight 5 application and
Create a new class MyData.cs with:
Replace MainPage.xaml.cs with:
and MainPage.xaml with:
Now, run the application and see that the dates are still displayed in US format!
Patrick
with the previous version (.912) of RadGridView, it was easy to change the culture of the application: a single call to
Thread.CurrentThread.CurrentCulture = new CultureInfo("xxx");In the last version (.1017), it seems that now the formatting is made in another thread and that the culture is no more taken into account!
If you create a new Silverlight 5 application and
Create a new class MyData.cs with:
using System;namespace RadControlsSilverlightApp1{ public class MyData { public DateTime DateTime {get; set;} }}Replace MainPage.xaml.cs with:
using System;using System.Globalization;using System.Threading;using System.Windows.Controls;namespace RadControlsSilverlightApp1{ public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-fr"); var Data = new MyData[100]; var DT = DateTime.Now; var Rnd = new Random(); for (Int32 ix = 0; ix < 100; ix++) { Data[ix] = new MyData () {DateTime = DT}; DT = DT.AddSeconds(Rnd.Next(60 * 60 * 24)); } GridView.ItemsSource = Data; } }}and MainPage.xaml with:
<UserControl x:Class="RadControlsSilverlightApp1.MainPage" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid Margin="5"> <telerik:RadGridView Name="GridView" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataFormatString="G" DataMemberBinding="{Binding DateTime}" Header="Date" Width="150" /> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid></UserControl>Now, run the application and see that the dates are still displayed in US format!
Patrick