[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [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
   [Collapse]Get Started With Data Grid and Views
     [Expand]Appearance and Conditional Formatting
     [Expand]Data Editing
     [Expand]Hit Information
     [Expand]Data Binding and Working with Columns
     [Expand]Grid View - Columns, Rows and Cells
     [Expand]Banded Views
     [Expand]WinExplorer View
     [Expand]Tile View
     [Collapse]Filter and Search
       Tutorial: Column Filter Dropdowns
       Tutorial: Data Filtering Basics and Filter Panel Settings
       Tutorial: Excel-Style Custom Filter Dialog
       Tutorial: Filter Editor
       Tutorial: Filter Row
       Tutorial: Filtering and Locating Rows API
       Tutorial: Incremental Search
       Tutorial: Search/Find Panel
     [Expand]Split Presentation
     [Expand]Row Preview Sections
   [Expand]Data Binding
    Unbound Columns
   [Expand]Data Editing and Validation
   [Expand]Filter and Search
   [Expand]Focus and Selection Handling
    Format Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Expand]Batch Modifications
    Hit Information
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [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]Sunburst 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]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Tutorial: Data Filtering Basics and Filter Panel Settings

This walkthrough is a transcript of the Data Filtering Basics and Filter Panel Settings video available on the DevExpress YouTube Channel.

While there are multiple different UI options for data filtering, there's also common functionality. Regardless of the way a filter condition was applied, it can be visualized and manipulated using the Filter Panel. You will learn how to control this panel's availability and customize its content. This video will then show you how to disable filtering UI for an individual column or the entire view.

Expanded Default Behavior

The GridControl provides multiple UI elements allowing end-users to filter data. They can select a value from the Excel-style column header dropdown, or use the Custom Filter Dialog to combine two filter conditions into one filtering expression. More complex criteria can be built using the Filter Editor dialog.

Once a filter has been applied, the Filter Panel appears at the bottom of the View. It displays the currently applied filter condition and provides additional controls.

Click the Edit Filter Button to view and customize the current filter condition using the Filter Editor.

The dropdown button allows end-users to invoke a list of recently used conditions and re-apply them.

The check box can be used to temporarily disable and enable the current filter. Click the close button to hide the filter panel and clear the current filter.

Expanded Manually Changing Filter Panel Visibility

The default behavior you've just experienced is that the Filter Panel appears when you apply the filter and disappears when the no condition is applied. To change this, close the application, expand the grid's GridView.OptionsView property and set the ColumnViewOptionsView.ShowFilterPanelMode to ShowFilterPanelMode.Never.

Run the application and filter data. The Filter Panel will not appear.

Then, open the Property grid displaying View options. Set the ColumnViewOptionsView.ShowFilterPanelMode property to ShowFilterPanelMode.ShowAlways to always display the Filter Panel even if no filtering is applied to the View. In this mode, the close button is not displayed within the panel.

Expanded Hiding Filter Panel Buttons

You can also hide the Filter Panel's Edit Filter button by expanding the ColumnView.OptionsFilter property and disabling the ColumnViewOptionsFilter.AllowFilterEditor option.

Then, set the ColumnViewOptionsFilter.AllowMRUFilterList property to false. This disables the dropdown button that gave access to the most recently used filter conditions.

Expanded Restricting End-User Filtering

You can also use grid view options to control filtering UI availability for individual columns or the entire view.

Close the application, select the Priority column and disable its OptionsColumnFilter.AllowFilter option, which is accessible using the ColumnView.OptionsFilter property.

Run the application to see that the filter button is not displayed for the Priority column. However, you can still filter data against other columns.

To prevent end-user filtering against all columns in the view, expand the View's GridView.OptionsCustomization property and disable the GridOptionsCustomization.AllowFilter option. Now all data filtering UI is disabled.

Expanded See Also

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