This example illustrates how to specify a column's FilterTemplate by using two ASPxDateEdit controls and use them for date range filtering:
- Enter the start and end date values;
- Call the client-side ASPxClientGridView.AutoFilterByColumn method and pass the target column's FieldName and entered values as parameters;
- Handle the server-side ASPxGridView.ProcessColumnAutoFilter event;
- Check if the currently processed column (e.Column.FieldName) is the target one. If so, retrieve the passed value (e.Value) and create data range filter criteria (e.Criteria) using the approach illustrated in the Create the Custom Filter Criteria example.
See Also:
E2203: CheckComboBox filtering in the Auto Filter Row
E1950: ASPxGridView - Date auto filter
E5038: GridView - How to implement date range filtering using a custom editor in the AutoFilterRow
Question Comments
Added By: Gunnar Steinn Magnússon at: 8/24/2012 9:03:41 AM
Could you please post a suggested way to do implement this with MVCxGridView?
Added By: esa s at: 7/29/2013 6:46:41 AMhi, in this sample by clicking twice on the Apply button (without changing dates), the dateSelector control would not be loaded and it will cause an exception in your gridview, would you please check this ? thanks