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
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Expand]Nodes
    [Expand]Data Editing
    [Expand]Data Presentation
    [Expand]Sorting
    [Collapse]Filtering
      Filtering in Code
      Excel-Style Filter Dropdowns
    [Expand]Summaries
    [Expand]Appearances and Look And Feel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
    [Expand]Miscellaneous
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End User Capabilities
   [Expand]Member Tables
  [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]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Excel-Style Filter Dropdowns

This topic describes Excel-style filter menus. For general information about this and other types of filter menus, refer to the Column's Filter DropDown topic.

Expanded Feature Overview

This filter menu type displays a Microsoft Excel®-inspired filter dropdown by default. Along with the ability to select custom values, it provides predefined filters suitable for the column data type. See the animated image below.

Visually, the drop-down menu consists of two tabs:

  • The Values tab allows an end-user to select specific values or value ranges.
  • The Filters tab displays predefined filter conditions based on the current column's data type. For instance, for date-time columns, it includes Today, Next Week, Last Month, This Year, etc. For numeric columns, it includes Between, Greater Than, etc.

Related API

The filter menu UI is automatically determined based on the column's data type. You can see a list of supported data types and UI examples below:

Expanded Invoke Filter Menu

An end-user can invoke the filter menu by clicking the column's Filter Button . In code, you can invoke the menu by calling the TreeList.ShowFilterPopup method.

Expanded Enable Excel-Inspired Filter Drop-down

The Excel-inspired style is enabled by default, but you can override this behavior and specify the style at three levels:

  1. Application level

    The WindowsFormsSettings.ColumnFilterPopupMode static property specifies the default style for all TreeList controls in your application.

  2. Control level

    A TreeList's TreeListOptionsFilter.ColumnFilterPopupMode property (TreeList.OptionsFilter.ColumnFilterPopupMode) specifies the default style in a specific control. This setting overrides the WindowsFormsSettings.ColumnFilterPopupMode global setting.

  3. Column level

    A column's TreeListOptionsColumnFilter.FilterPopupMode property (TreeListColumn.OptionsFilter.FilterPopupMode) specifies the style for a specific column. This setting overrides the TreeList.OptionsFilter.ColumnFilterPopupMode setting.

Expanded Filter Groups

By default, a column's filter menu shows only values available in that column. To filter data by multiple columns, invoke each column's menu.

It is also possible to group filter values in the current column's filter menu by another column. This allows you to filter data for multiple columns from a single menu.

To enable this feature, use the column's TreeListColumn.OptionsFilter.PopupExcelFilterGrouping property (see TreeListOptionsColumnFilter.PopupExcelFilterGrouping). This property specifies data fields (columns) by which to group filter values in a specific column's filter menu. Data fields (columns) should be specified by their names as strings separated by the comma, semicolon, space or tab character.

The code below shows how to display assigned tasks below each employee as illustrated in the figure above.

You can specify two or more data fields (columns) to group filter values by multiple columns. The field name order determines the group hierarchy. To show assigned tasks below each employee in the Task column's filter menu, you can change the group hierarchy using the following code.

As a result, values from the Employee column are shown at the root level.

In the case of a Code First data source, you can annotate data fields with the FilterGroup attribute using the same syntax in the attribute parameter.

See Filtering Attributes to learn more.

Expanded See Also

Is this topic helpful?​​​​​​​