Skip to main content

OptionsColumnFilter.FilterPopupMode Property

Gets or sets which filtering options are available in pop-up menus and how they are presented.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DefaultValue(FilterPopupMode.Default)]
[XtraSerializableProperty]
public virtual FilterPopupMode FilterPopupMode { get; set; }

Property Value

Type Default Description
FilterPopupMode Default

A FilterPopupMode value that specifies how filtering options are presented in pop-up menus.

Available values:

Name Description
Default

The actual display mode is determined by the View’s OptionsFilter.ColumnFilterPopupMode (ColumnViewOptionsFilter.ColumnFilterPopupMode) property.

If the View’s OptionsFilter.ColumnFilterPopupMode property is set to Classic:

  • for date-time columns, filter dropdowns are painted in FilterPopupMode.DateSmart mode;
  • for all other columns, filter dropdowns are painted in FilterPopupMode.List mode.

If the View’s OptionsFilter.ColumnFilterPopupMode property is set to Default (which is the initial value):

If the WindowsFormsSettings.ColumnFilterPopupMode property is also set to Default (which is the initial value):

  • the Excel filter dropdown style is applied.
List

The filter dropdown is represented as a regular list of filter items. Clicking an item invokes a corresponding action, and automatically closes the dropdown.

FilterDropDown_List

CheckedList

The filter dropdown is represented as a checked list of filter items. In this mode, an end-user can select more than one item simultaneously. When the dropdown window is closed by clicking the OK button, the View will display those records that contain the checked values:

FilterDropDown_CheckedList

Date

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.

DateSmart

The filter dropdown contains a built-in calendar plus check boxes to select common non-intersecting date intervals.

CalendarFilterDropdown-Date

The available date intervals include:

  • 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
  • Today
  • 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 for the specified 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.

The built-in calendar allows a user to select a specific date or a date range. To allow the selection of two or more individual dates, switch to Excel display mode.

DateAlt

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

CalendarFilterDropdown-DateAlt.png

  • 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.
Excel

The tabbed UI, inspired by MS Excel, that displays column values and provides filtering options most suitable for the column’s data type.

GridExcelFilter_DateFilters_Values

Property Paths

You can access this nested property as listed below:

Object Type Path to FilterPopupMode
GridColumn
.OptionsFilter .FilterPopupMode

Remarks

Use the following properties to specify the filter menu mode:

using DevExpress.XtraEditors;

WindowsFormsSettings.ColumnFilterPopupMode = DevExpress.XtraEditors.ColumnFilterPopupMode.Classic;
gridView1.OptionsFilter.ColumnFilterPopupMode = DevExpress.XtraGrid.Columns.ColumnFilterPopupMode.Excel;
colAddress.OptionsFilter.FilterPopupMode = DevExpress.XtraGrid.Columns.FilterPopupMode.CheckedList;
colDate.OptionsFilter.FilterPopupMode = DevExpress.XtraGrid.Columns.FilterPopupMode.Date;

Note

If you handle events from the list below, Data Grid switches from Excel-style filters to classic filtering menus. In this case, set the GridColumn.OptionsFilter.FilterPopupMode property to Excel to use Excel-style filters.

See Also