[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 and Skin Colors
  [Collapse]Filtering UI Context
    Filtering Events
    Filtering Attributes
    Base and Parent Filtering ViewModels
    Filtering UI Context Designer
  [Expand]High DPI Support
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML Text Formatting
  [Expand]Tooltip Management
  [Expand]Saving and Restoring Layouts
   Clipboard - Copy and Paste Operations. Data 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]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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Filtering UI Context

The Filtering UI Context produces a set of editors end-users can utilize to filter data a stand-alone, data-aware control displays. The Automatic Filtering UI demo illustrates a sample filtering UI generated for the Data Grid.

Expanded Supported Data-Aware Controls

The Filtering UI Context generates filter criteria and passes it to the data-aware control, which causes the latter to apply the corresponding filters. The Filtering UI Context can be used with all DevExpress data-aware controls that support filtering by criteria expressions:

Expanded Binding Modes

The Filtering UI Context generates a filtering UI from either a data-aware control directly, or from a provided filtering Model.

  • Data-Aware Client (Simple Mode)
    The Filtering UI Context generates a filtering UI directly from a selected data-aware control. For this approach, you may have a reduced number of available customization options.

  • Filtering Model (Advanced Mode)
    A Model is a separate class that declares properties which match fields of your data-aware control's source.

    You can either create such a Model manually or use the same class a data-aware control utilizes when binding to code-first data sources like the Entity Framework.

Initially, the component's smart tag is tuned to match the simple mode; click the "Enable Advanced Binding" link to browse advanced mode settings.

Setting base and parent ViewModels are optional. See the Base and Parent Filtering ViewModels article to learn more.

No matter what approach you choose (a client container, or a code-first model), you can add custom fields to the component. To do that, call any FilteringUIContext.AddField method overload. Note that custom fields do not automatically add corresponding editors to the UI. You need to call the RetrieveFields method manually.

Expanded Refresh Bindings

If data in the Filtering UI Context's source changes, you can call the ResetBinding/ResetBindings methods to manually refresh editors' values.

Expanded Filtering UI

The Filtering UI Context populates either an Accordion Control or a Layout Control with items. Utilize the component's smart-tag to choose an appropriate container (or create one, if none are available).

A generated Accordion\Layout item contains an editor (or multiple editors) that fits the filtered data type. For instance, to filter a numeric field's data, the component generates two text boxes and a RangeTrackBarControl. You can remove these editors, customize them, or switch to other editor types by clicking the link at design time (see the figure below).

The Filtering UI Context generates editors only once when you click the "Retrieve Fields" link in a component's smart tag or call the "RetrieveFields" method in code. If a data source changes, you need to re-generate a filtering UI.

Handling specific events and adding filtering attributes also changes a filtering UI.

Expanded See Also

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