Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • When I add a Grid View, the text filtering works OK. However, it appears that there is still no way to select a date range, the ShowHeaderFilterButton option drops down a list of distinct values (not a calendar as expected), and the filtering insists on using mm/dd/yyyy date formats, which is completely inappropriate for a British application.
                                    Can you please let me know how to get the filtering to work with a dd/MM/yyyy date format (I have the globalisation set to en-GB in the web.config, and the system is configured as British English and is using dd/MM/yyyy date formats for non-DevExpress date parsing)?
                                    Can you please also let me know how to prompt the headerfilterbutton dropdown to show a calendar selection?
                                    Finally, is it possible yet to do a date range? The last response I found on this was in 2008 suggesting it wasn't yet possible in the ASPxGrid controls without doing custom filtering?

                                0

                                Hello David,

                                Thank you for the detailed description of the issue. Here are answers to your questions:

                                >> Can you please let me know how to get the filtering to work with a dd/MM/yyyy date format

                                To set the required format of the displayed data, specify the DateEditProperties.DisplayFormatString property of a required Date DataColumn via the column's editor properties. The same format will be applied to items displayed within a Filter DropDown:

                                [C#]
                                var column = new MVCxGridViewColumn("HireDate", MVCxGridViewColumnType.DateEdit); ((DevExpress.Web.ASPxGridView.GridViewEditDataColumn)(column)).PropertiesEdit.DisplayFormatString = "dd/MM/yyyy"; settings.Columns.Add(column);

                                To populate the Filter DropDown with required custom entries, use the GridViewSettings.HeaderFilterFillItems property (the MVC analog of the HeaderFilterFillItems event).

                                >> Can you please also let me know how to prompt the headerfilterbutton dropdown to show a calendar selection?

                                The GridView's HeaderFilter allows displaying string entries only. To filter GridView by using the corresponding column's editor, use the AutoFilterRow.

                                The ASPxGridView control, whose functionality is used by the MVC GridView extension, does not support the built-in Data-Range filtering functionality for the following reason:
                                The type of the editor that is rendered within the EditForm and AutoFilterRow is determined by the type of the column:
                                - the GridViewDataTextColumn renders the ASPxTextBox editor;
                                - the GridViewDataDateColumn renders the ASPxDateEdit editor;
                                etc.

                                Since there is no specially designed editor for the Date-Range operations in the ASPxEditors Suite, the ASPxGridView does not allow creating the corresponding DataColumn.

                                It is possible to accomplish this task by using the ASPxDropDownEdit editor, which allows customizing its DropDownWindowTemplate with two ASPxDateEdit editors for selecting Date-Range. However, this approach requires the use of the ASPxGridView.ProcessColumnAutoFilter event (see the Date range filtering in the Filter Row Code Central example for more information), whose analog does not exist in the MVC GridView extension. If you wish, you can create a corresponding request to support the required event's analog for the MVC GridView extension.

                                Regards,
                                Mike

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners