Log In
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Chart Control
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
    [Expand]Binding to Data
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Expand]Data Editing
    [Collapse]Data Shaping and Manipulation
     [Expand]Data Summaries
       Filtering in Code
       Filter Row
       Filter Control
       Header Filter
       Search Panel
      Cell Merging
    [Expand]Data Formatting
    [Expand]Master-Detail Relationship
     Appearance Customization
     Save and Restore Layout
    ASPxGridView Designer
   [Expand]Visual Elements
   [Expand]Member Tables
   [Expand]ASPxGridView - Animated Images
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Filtering in Code

To apply a filter to ASPxGridView, you can do one of the following.

The ASPxGridBase.FilterExpression property allows you to provide complex filter criteria (filter data by multiple columns).

To filter data on the client, use the ASPxClientGridView.AutoFilterByColumn method.

Expanded Example 1

The following code applies a filter that selects departments whose budget is greater than 100,000 and that are located in Monterey. The filter criteria are displayed within the ASPxGridView's Title Panel.

The image below shows the result:

To clear filter settings for a single column, pass an empty string to the column's GridViewDataColumn.AutoFilterBy method.

Setting the ASPxGridBase.FilterExpression property to an empty string clears the filter expression applied to ASPxGridView.

Expanded See Also

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