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

RadGridView filter displays date in wrong format

1 Answer 281 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Benedikt
Top achievements
Rank 1
Benedikt asked on 26 Oct 2015, 03:18 PM

I have the problem, that the filter in the Telerik RadGridView has a wrong formatting for date fields. In the grid it self they are drawn correctly. I use the format: dd.mm.yyyy

 Please take a look at the attached screenshot.

 I set the column culture like this:

GridViewBoundColumnBase column = new GridViewDataColumn();
column.Language = System.Windows.Markup.XmlLanguage.GetLanguage("de-DE");
this.IsLocalizationLanguageRespected = true; // this is the instance of the RadGridView

Thank you!

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 29 Oct 2015, 01:02 PM
Hi Benedikt,

You can try setting the date time format of the column through the DataFormatString property. You can find more information regarding it on the following documentation page -Data Formatting. Once you apply it the filter should inherit the value of this property. I have tested this at my end and it works correctly with changing the different date formats. You can simply use the following code in your XAML:

<telerik:GridViewDataColumn  DataMemberBinding="{Binding DateEstablished}"
     Header="Date"
     DataFormatString="{}{0:dd.MM.yyyy}"/>


Regards,
Stefan Nenchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Benedikt
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or