When I use the excel like filters of equals, greater than, or greater than or equal to with date columns I find no matches.
My DateTime values bound to the column have 00:00:00.0000 as the time component, like 9/30/2008 00:00:00.00000. When I pick this date on the calendar control in the excel like filter popup it works fine, but if I pick Available Filters -> Equals (or greater than, or greater than or equal to) and enter 9/30/2008 then it does not match the 9/30/2008 00:00:00.00000 rows.
I have tried this with FilteringMode = Date and FilteringMode = All, but it does not seem to make a difference. It seems like equals etc. is comparing it to like 9/30/2008 00:00:01.00000 or something crazy like that.
Is there something I can do to get these equals etc. filters working?
Using version 2021.2.615.40
In your example, if I use the calendar control then the sequence works:
But if I do not use the calendar control then it does not work. This sequence produces no results:
Another note (which does not seem to change this scenario so far), using Today instead of Now for your sample data reflects our scenario a bit better (zeros out the time component):
this.radGridView1.Rows.Add(i,"Row"+i,DateTime.Today.AddDays(i));
Thank you for the detailed steps. It seems that the difference in the second case is that I use the popup calendar, while you enter the date input directly without opening the drop down at all. In this case, I was able to observe the described undesired behavior.
I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.
I have also updated your Telerik points.
Currently, the possible solution that I can suggest is to use the following custom implementation for CompositeDataFilterForm:
private void RadGridView1_CreateCompositeFilterDialog(object sender, GridViewCreateCompositeFilterDialogEventArgs e) { e.Dialog = new CustomCompositeDataFilterForm(); } public class CustomCompositeDataFilterForm : CompositeDataFilterForm { protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); if (GridFilterCellElement.ValidateUserFilter(this.FilterDescriptor)) { CompositeFilterDescriptor cfd = this.FilterDescriptor as CompositeFilterDescriptor; if (cfd != null) { foreach (FilterDescriptor fd in cfd.FilterDescriptors) { TrimTimePart(fd); } } else { TrimTimePart(this.FilterDescriptor); } } } private void TrimTimePart(FilterDescriptor filterDescriptor) { CompositeFilterDescriptor cfd = filterDescriptor as CompositeFilterDescriptor; if (cfd != null) { foreach (FilterDescriptor fd in cfd.FilterDescriptors) { TrimTimePart(fd); } } else { DateTime dateValue = DateTime.MinValue; if (DateTime.TryParse(filterDescriptor.Value + "", out dateValue)) { dateValue = dateValue.Date; filterDescriptor.Value = dateValue; } } } }