I'm not able to use german date format to filter my grid.
I've got a project that is set to german culture using
var Culture = new CultureInfo("de-DE");//Culture.DateTimeFormat = DateTimeFormatInfo.CurrentInfo; // No effect on datetime parsing
Thread.CurrentThread.CurrentCulture = Culture;Thread.CurrentThread.CurrentUICulture = Culture;This is done in App.cs. Interestingly enough these options alone don't change the language of the grid, I have to add the following to my window:
this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);
So now the grid's in german and I'm trying to filter the Column "DateTime". After adding the data I'm using this code:
MyGrid.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("DateTime", Windows.Data.FilterOperator.IsEqualTo, "31.01.2018"));
Which throws an exception because obviously the Date "31.01.2018" can not be parsed.
Funny: Switching the month and day (without changing periods to slashes) works:
MyGrid.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("DateTime", Windows.Data.FilterOperator.IsEqualTo, "01.31.2018"));
