v15.2
This example is now obsolete. Starting with v15.2, we implemented a new GridViewDataColumnHeaderFilterSettings.Mode property. Please refer to the Date Range Header Filter demo.
For older versions:
This example demonstrates how to implement date range filtering in the GridView extension.
Use the MVCxGridViewColumn.SetFilterTemplateContent method to create a custom editor and assign a delegate method to the GridViewSettings.ProcessColumnAutoFilter property to process a custom filter expression sent from the client side.
See also:
E1990: Date range filtering in the Filter Row
Question Comments
Added By: Gustavo Sainz at: 11/11/2014 11:08:43 AM
I can't make it to work, as the ProcessColumnAutoFilter does not trigger when settings the grid to use
settings.CustomBindingRouteValuesCollection.Add(GridViewOperationType.Filtering, new { Controller = "ViewDate", Action = "AdvancedCustomBindingFilteringAction", key = "-1" });
Any idea how to resolve this?
Added By: Vladimir (DevExpress Support) at: 11/11/2014 10:25:08 PMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T171947: The ProcessColumnAutoFilter does not trigger. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
I've implemented this technique in our solution and it seems to basically work. The user's current selections are displayed in the EndCallback function via "dde.SetText". However, when the user manually clears out those values I would like the custom filtering to be removed, which is the same behavior for a "normal" field. I'd also like to allow the user to type a date range in their manually ("03/01/2015|04/01/2015") and have the same affect as though those dates were selected via the calendar popup.
How can I get that to happen? I haven't been able to figure out what event(s) should be captured. Having the user manually enter dates isn't critical, but we'd definitely like to be able to have those cleared values reset the filtering for the column.
Note that we haven't yet upgraded to v2015, so we're looking for a v2014 solution, if possible.
Added By: Artem (DevExpress Support) at: 1/22/2016 4:31:27 AMHello Don,
To process your recent post more efficiently, I created a separate ticket on your behalf: T337328: Improve date range filtering example. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.