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
     [Expand]Filter Dropdowns
     [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 Editor

Expanded Online Video

The Grid Control ships with a built-in Filter Editor dialog that allows end-users to build filter criteria of any complexity using either the tree-like filter builder interface or a text editor with hints mush like Visual Studio IntelliSense. In this video, you will learn how end-users can invoke this dialog, what options affect its availability and how you can invoke it from code and customize it before it is displayed.

The Filter Editor allows end-users to build complex filter criteria with an unlimited number of filter conditions, combined by logical operators. You can enable a Tree-Like or text-based filter editing style or use both styles.

Tree-like filter editing style.

Text-based filter editing.

When you enable both the Tree-like or Text-based filter editing style, the Filter Editor will contain two tabs providing these editing capabilities.

Expanded Filter Editor's Settings

The availability of the Filter Editor is controlled by the ColumnViewOptionsFilter.AllowFilterEditor option. By default this property is set to true, allowing end-users to use the Filter Editor. Use the ColumnViewOptionsFilter.DefaultFilterEditorView property to enable the Tree-Like or text-based filter editing style or use both styles.

In code, the Filter Editor can be opened via the ColumnView.ShowFilterEditor method.

End-users can invoke the Filter Editor using the Edit Filter Button, which is displayed within the filter panel or via the Column Header Context Menu. The Filter Editor is also invoked when choosing the (Custom...) item from the filter dropdown, provided that the Custom Filter Dialog cannot display the column's current filter criteria in its entirety.

When the Filter Editor is about to be displayed, the ColumnView.FilterEditorCreated event fires. This allows you to customize the Filter Editor and the form on which it resides, or prevent the Filter Editor from being displayed, depending on your requirements.

Every element within the Filter Editor can be localized. For details on localizing DevExpress .NET products, see Localization.

Expanded Tree-Like Filter Editing Style - Visual Elements

The Filter Editor displays filter criteria as a tree structure, where nodes represent simple filter conditions. If the filter criteria consist of multiple filter conditions, the Filter Editor contains multiple nodes linked by logical operators into groups. For instance, the following image shows the Filter Editor representing the "[Product] = 'Chang' And [Quantity] > 20" filter expression.

Conditions combined by a logical operator at the same level form a group. You can think of groups as clauses wrapped by round brackets in the filter expression. There is only one group in the example above. In the following example, the filter expression contains two groups combined by the logical OR operator. The expression "([Product] = 'Chang' And [Quantity] > 20) Or ([Product] In ('Tofu', 'Konbu') And [Quantity] < 100)" is represented in the Filter Editor as follows.

The image below shows the Filter Editor, indicating its elements.

Expanded Text-Based Filter Editing Style

You can quickly enter a filter by typing it directly within the embedded Rich Text Editor. Dropdown lists of operators and field names are automatically invoked when typing a filter. If you need to replace the typed operator or field name with another one, move the caret to this position and press CTRL+SPACE. The corresponding dropdown list will be opened and this will contain available operators/fields.

In the text-based editing style, the Filter Editor supports syntax highlighting, Intellisense and in-place editing.

Expanded See Also

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