Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
  [Expand]Application Appearance
  [Collapse]Filtering UI Context
   [Expand]Getting Started
   [Expand]Advanced Concepts
  [Expand]High DPI Support
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML Text Formatting
  [Expand]Tooltip Management
  [Expand]Saving and Restoring Layouts
   Clipboard - Copy Data and Formatting
   Version Compatibility: Default Property Values
  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 UI Context

Filtering data is an essential feature for any data-aware control. DevExpress data controls provide several different methods to do that out-of-the-box. For instance, the Data Grid control in its default Grid View displays filter buttons within column headers. End-users can click these buttons to select a value against which data should be filtered (see the figure below).

For data-aware controls that lack built-in filtering support that fits your requirements, you can implement the UI seen in various on-line stores: customers filter data by using a set of editors, grouped within the panel that is docked to either edge of the screen. The figure below illustrates the Data Grid control in the WinExplorer View. The panel to the grid's right contains editors that allow end-users to group grid data by name, color, product line, etc.

To implement such a UI, use the Filtering UI Context component. The main features of this tool include:

  • generated editors are compatible with any data-aware control, capable of filtering its data using filter criteria expressions;
  • can analyze your data source and automatically generate DevExpress editors required for filtering this data;
  • can automatically implement editor logic: no manual coding is required;
  • can support various filtering attributes that shape your generated editors, format their display text, stack multiple editors into separate groups, etc.;
  • can operate with Models and ViewModels, which allow for it to be fully compatible with the WinForms MVVM architectural pattern.

Follow the learning curve below; it will gradually introduce key Filtering UI Context concepts.

  • The first lesson will demonstrate how to prepare a layout for utilizing the Filtering UI Context component.
  • The Filtering Model lesson explains how to initially generate filtering editors and how they communicate with the target data-aware control.
  • The Filtering Events article demonstrates how to supply your generated editors with child look-up items and other crucial information.
  • Using filtering attributes, you can fine-tune editors generated for each particular filtering Model property.
  • Finally, the Filtering UI Context Designer allows you to quickly build a ready-to-use filtering UI almost entirely at design time.

These steps above are sufficient to implement a fully functional filtering UI. For information on using the Filtering UI Context component in more complex MVVM-based applications, refer to this section.

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