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

Datetime filtering in 24H format

1 Answer 194 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Riaan
Top achievements
Rank 1
Riaan asked on 28 Apr 2009, 09:34 AM
Hello,

My grid is displaying the time in 24time format correctly, however, I am having trouble filtering the data in that column. 

The timeview is not in 24H format.

My question is, is there a way that I can force the GridDateTimeColumn's filter's timeview to be 24H format.

Included is the aspx of my column.

Thanks in advance.

  <telerik:GridDateTimeColumn FilterControlWidth="170px" DataField="SubmissionDate" DataFormatString="{0:dd MMMMMMMMMMMM yyyy HH:mm}" 
                            DataType="System.DateTime" Display="True" HeaderText="Submission Date" PickerType="DateTimePicker"  
                            SortExpression="SubmissionDate" UniqueName="SubmissionDate"

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 01 May 2009, 10:04 AM
Hello Riaan,

You can achieve your goal if you change the format of the DateTime. This format is depending on the localization settings applied to the server. The RadGrid filter the data provided to the DataSource property and cannot filter the data depending on the applied DataStringFormat. In other words if the provided data returns DateTime with 12H format, the grid cannot filter it like it is 24H. You need to provide data with 24H format to the grid to accomplish your task.

Best regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Riaan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or