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

DateTimeColumn Filter

1 Answer 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 17 Jul 2018, 08:03 AM

The filter (yesterday, today, specific date) for DateTimeColumns only work for data without time portions. If the data contains date with time values the filters are useless.

I've changed the behavior for the yesterday/today filter with the OnFilterPopupRequired event (https://docs.telerik.com/devtools/winforms/gridview/filtering/excel-like-filtering) Is there any simple way to override the behavior for the calendar element? (select a specific date the filter has to be for the entire day 00:00 to 23:59, so it needs be a composite filter >= and <)

Anyway: the filters should work for date and datetime data by default 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Jul 2018, 07:17 AM
Hello, Christian,    

GridViewDateTimeColumn allows you to change the way the dates in the column are filtered by the FilteringMode. This is how the column can be adjusted to filter only by dates.

GridViewDateTimeColumn dateTimeColumn1 = new GridViewDateTimeColumn("DateTimeColumn");
dateTimeColumn1.FilteringMode = GridViewTimeFilteringMode.Date;
this.radGridView1.Columns.Add(dateTimeColumn1);

I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Christian
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or