Filter on Date and Time
By default, when a GridViewDataColumn is bound to a property of type DateTime the generated field filter editor is a RadDateTimePicker. It's InputMode, however, is DatePicker which means that only the Date portion of the DateTime object can be selected through the UI.
Most probably, however, your DateTime data contains a time part which is different than 00:00:00. When you filter and select a DateTime value, this selected DateTime will have its time part equal to zero. Since DateTime objects with different time parts are not equal for the .NET Framework, you will have no match.
A possible approach in the case when you also wish to filter out the Time portion is to handle the FieldFilterEditorCreated event and set the InputMode of the RadDateTimePicker editor to DateTimePicker. Example 1 demonstrates how this can be achieved.
Example 1: Change the InputMode of the RadDateTimePicker filter editor to DateTimePicker
private void GridView_FieldFilterEditorCreated(object sender, Telerik.Windows.Controls.GridView.EditorCreatedEventArgs e)
{
if (e.Column.UniqueName == "HireDate")
{
Telerik.Windows.Controls.RadDateTimePicker picker = e.Editor as Telerik.Windows.Controls.RadDateTimePicker;
if (picker != null)
{
picker.InputMode = Telerik.Windows.Controls.InputMode.DateTimePicker;
}
}
}
Example 2: Bind the column to the Date portion of the property
<telerik:GridViewDataColumn DataMemberBinding="{Binding HireDate.Date}" />
Example 3: Filter only on the Date portion of the property with FilterMemberPath
<telerik:GridViewDataColumn DataMemberBinding="{Binding HireDate}" FilterMemberPath="HireDate.Date" />