Log In
[Expand]General Information
[Collapse]WinForms Controls
 [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]Data Editing
   [Collapse]Filtering and Locating Rows
     [Expand]Filter Dropdowns
      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]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [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]Report Server
[Expand]eXpressApp Framework
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Filtering Overview

Filtering allows you to display a subset of the records in the data source that meet a particular criteria. When filtering is applied to a Grid View, displayed records are restricted to those that meet the current filter criteria. You can filter data against single or multiple columns. End-users can apply filtering by selecting a column's value from the filter dropdown, building a filter via the Filter Editor or by using the Custom Filter Dialog.

Expanded Online Videos

Expanded Filtering Overview

Grid Control supports an automatic filtering functionality for any data source. When a filter is applied to a column, the grid does not delegate filtering tasks to the underlying data source. Instead, the grid filters data itself, so the filtering mechanism does not depend upon the data source's type.

When the grid is bound to a System.Data.DataView data source, it does not modify the System.Data.DataView.RowFilter property. You can use this property to apply filtering directly to a data source, if required.

In the following image, filtering is applied to two columns ('Order Date' and 'Ship Region') in a Grid View.

In a Grid View, an end-user can apply, change or remove filtering via a column's Filter Button. Clicking it invokes a filter dropdown list that by default contains predefined ((All), (Custom), (Blanks) and (Non Blanks)) values along with the values of items. The most recently used filter conditions are displayed at the top of the list. The following image shows a filter dropdown list invoked for a column in a Grid View.

In a Card View, a filter dropdown list can be invoked via the Customization Button.

It is also possible to add custom filter items to the filter dropdown list. When these items are selected, you can apply custom filter criteria to data. For more information on the filter dropdown list and its customization, refer to the Filter Dropdowns document.

Applying filtering to a column does not affect the filter settings of any other column.

After a filter has been applied to a current View, the filter panel appears by default at the bottom of a View.

The filter panel displays a string that represents current filter criteria. It also contains the filter related buttons.
  • The 'x' button, used to close the filter panel and clear the current filter.

    This button is not available when the ColumnViewOptionsView.ShowFilterPanelMode property is set to ShowAlways.

  • A check button that can be used to disable/enable a filter.
  • A dropdown button that can be used to invoke a list of recently used filter criteria.
  • The Edit filter button that can be used to open the Filter Editor.

Note that you can make a filter panel always visible or always hidden using the ColumnViewOptionsView.ShowFilterPanelMode property.

For end-user convenience, you can implement custom filter options in the column header context menu or group panel context menu. An example of adding "Clear Filter" and "Can Filter" options is demonstrated in the Data Filtering module in the GridMainDemo. You can also refer to the Implementing Custom Behavior for Popup Menus document, which gives you detailed information on customizing built-in popup menus.


If an exception is raised on applying a filter in a grid control, this exception is silently swallowed by the grid.

Expanded Row Visibility

You can make specific rows always visible or hidden regardless of the current filter. Handle the ColumnView.CustomRowFilter event to accomplish this task.

Expanded See Also

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