Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]MVVM Enhancements
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Collapse]Examples
    [Expand]Binding to Data
    [Collapse]Grouping, Filtering and Summarizing
      How to: Group Fields
      How to: Group Date-Time Values
      How to: Implement Custom Group Intervals
      How to: Apply a Filter to a Field
      How to: Implement the Group Filter
      How to: Display Top N Values
      How to: Add Custom Totals
      How to: Calculate Multiple Custom Totals with Custom Summary Type
      How to: Implement Custom Summary
      How to: Sort Data by Grand Totals
      How to: Sort Data by Individual Columns (Rows)
      How to: Sort Data by Individual Columns (Rows) in OLAP Mode
      How to: Sort Data in Server Mode Using the Custom Sorting Algorithm
      How to: Prevent End-Users From Changing Filter Conditions
      How to: Add and Remove Items From Filter Drop-Down Lists
      How to: Sort Filter Drop-Down Items in a Custom Manner
      How to: Calculate Cumulative Values in the Pivot Grid Control
      How to: Format Cells to Show Custom Display Text
    [Expand]Appearance
    [Expand]Miscellaneous
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Apply a Filter to a Field

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2134.

This example shows how to apply a filter to a field. For this, a new FilterFieldValues method was created.

The first condition will select records which contain 'UK' in the 'fieldCountry' field. The second condition will filter the 'Category' field to display only four categories: 'Beverages', 'Condiments', 'Seafood', and 'Produce'.

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