Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Grid View
   [Expand]View Technology
   [Expand]Grouping
   [Expand]Sorting
   [Expand]Summaries
   [Expand]Data Editing
   [Collapse]Filtering and Locating Rows
    [Collapse]Filtering
     [Collapse]Filter Dropdowns
       Filter Dropdown: Excel Style
       Filter Dropdown: Regular
       Filter Dropdown: Checked
       Filter Dropdown: Calendar Style
     [Expand]Tutorials
      Filtering Overview
      Filter Settings
      MRU Filters
      Automatic Filtering Row
      Filter Editor
      Custom Filter Dialog
      Filtering in Code
     Locating Rows in Code
     Incremental Search
     Searching via Find Panel
     Tutorial: Incremental Search
     Tutorial: Search/Find Panel
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Expand]Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Hints
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Filter Dropdown: Calendar Style

A column Filter Dropdown can be represented in different ways - in the Excel-inspired style, as a regular or checked list, or as a calendar (for date-time columns). This topic describes the calendar Filter Dropdown type. For general information about this and other Filter Dropdown types, refer to the Filter Dropdowns topic.

The Filter Dropdown style for a particular column is inherited from the WindowsFormsSettings.ColumnFilterPopupMode global setting, and the View's ColumnViewOptionsFilter.ColumnFilterPopupMode setting, by default. If these settings enable the Classic style, date-time columns use the calendar Filter Dropdowns described in this topic. Set the column's OptionsColumnFilter.FilterPopupMode property to DateSmart, DateAlt or Date if the Excel style is enabled to override these settings and enable the calendar Filter Dropdowns for a particular column.

The calendar Filter Dropdown displays a built-in calendar and checkboxes for selecting common non-intersecting date intervals. It supports three modes which differ in the sets of the available check boxes:

DateSmart (default in the Classic mode) DateAlt Date
The filter dropdown provides a built-in calendar plus check boxes to select common non-intersecting date intervals.

The table below describes the available date ranges for the DateSmart and Date modes.
Interval Description
Beyond this year Dates that follow the current year.
Later this year Dates of the current year starting from the following month.
Later this month Dates of the current month that follow the next week.
Next week Dates that belong to the following week.
Later this week Dates of the current week starting from the day after tomorrow.
Tomorrow Tomorrow.
Today Today.
Yesterday Yesterday.
Earlier this week Dates of the current week that are prior to yesterday.
Last week Dates of the previous week.
Earlier this year Dates of the current year that are prior to the current month.
Prior to this year Dates that are prior to the current year.
If there is no underlying data that would fall into a specific date range, the corresponding check box is hidden.

If all values in the date-time column are set to null, all check boxes are visible.

This mode is equivalent to DateSmart, but with a different set of filters: Today, This week, This month, Next month, etc.

The table below describes several of the date ranges for the DateAlt mode.
Interval Description
Beyond Dates that belong to the month in three months time and beyond.
Earlier Dates that belong to the month seven months ago and earlier.
This mode is equivalent to DateSmart regarding the appearance of the filter dropdown. The filter dropdown displays all the available check boxes, even if there is no data that falls into a corresponding date range.

You can select between these modes with the OptionsColumnFilter.FilterPopupMode property, available from the column's GridColumn.OptionsFilter object.

Features supported by calendar Filter Dropdowns include:
  • An end-user can select a date or date range using the built-in calendar;
  • Easy selection of common date ranges using check boxes (see below);
  • The optional "Show Empty" check box to select records with null or DBNull values in the column (OptionsColumnFilter.ShowEmptyDateFilter).
  • Customization of check boxes using an event.

Expanded Date Intervals for DateSmart and Date Modes

The table below describes the available date ranges for the DateSmart and Date modes.

Interval Description
Beyond this year Dates that follow the current year.
Later this year Dates of the current year starting from the following month.
Later this month Dates of the current month that follow the next week.
Next week Dates that belong to the following week.
Later this week Dates of the current week starting from the day after tomorrow.
Tomorrow Tomorrow.
Today Today.
Yesterday Yesterday.
Earlier this week Dates of the current week that are prior to yesterday.
Last week Dates of the previous week.
Earlier this year Dates of the current year that are prior to the current month.
Prior to this year Dates that are prior to the current year.

Expanded Date Intervals for DateAlt Mode

The table below describes several of the date ranges for the DateAlt mode.

Interval Description
Beyond Dates that belong to the month in three months time and beyond.
Earlier Dates that belong to the month seven months ago and earlier.

Expanded Convert Calendar Filter Dropdown to Regular or Checked List

Instead of the calendar-style Filter Dropdown, you can present the Filter Dropdown as a regular or checked list of column values. Use the column's OptionsColumnFilter.FilterPopupMode property (accessible from the GridColumn.OptionsFilter object) to change the Filter Dropdown style.

For more information on these lists, see Filter Dropdown: Regular and Filter Dropdown: Checked.

Expanded Invoke Filter Dropdown

An end-user can invoke the Filter Dropdown by clicking the column's filter button. To open the column's Filter Dropdown in code, call the ColumnView.ShowFilterPopup method.

Expanded Calendar Filter Dropdown Options

The following lists cover options related to the calendar-style Filter Dropdowns:

Expanded Customize Check Boxes

The ColumnView.ShowFilterPopupDate event allows you to customize check boxes that represent common date ranges.

  • Add custom check boxes
  • Delete existing check boxes
Use the event's e.List parameter to access, add and modify items representing built-in check boxes.

Expanded Example

The following example shows how to add a custom filter item to the filter dropdown for a Date column.

The ColumnView.ShowFilterPopupDate event is handled, and a new filter item is added to the event's List parameter. The filter item, when checked by an end-user, will select the records that refer to last year:

How would you rate this topic?​​​​​​​