Unified criteria-based filtering in WinForms grids (coming soon in v17.2)

ctodx
13 November 2017

In the v17.2 release of DevExpress WinForms, we’re adding a valuable new feature across our full range of grid-based controls (Data Grid, Property Grid, Pivot Grid and Vertical Grid): a criteria-based filtering system. This filtering system is common across all the grid controls (hence, unified) and uses a criteria-based language to define filters.

// Set active filter for Chart
chartControl.SeriesTemplate.FilterString =
    "[Year]>=2015 And [Company]='DevAV Center' And [Sales]>50000";

The legacy methods in these controls to filter data still work (and you can still use them), but we recommend switching to this new criteria-based filtering. After all, doing so will help your users immeasurably: they only have to learn one way of filtering.

The filtering engine itself receives a few moderate enhancements:

  • a new “Blanks” item in filtering pop-ups;
  • HTML-formatting for filter and data items;
  • new PrepareTemplate, CustomizeTemplate and QueryFilterCriteria events that provide the ability to modify filtering UI templates and criteria expressions.

With v17.2, you can expect one filtering UI enhancement implemented in, say, the Data Grid to be automatically expanded to the rest of the supported data-aware controls, since all of them now share a unified filter editor set.

As an example, the image below illustrates the HTML-formatting applied to a Data Grid pop-up and an editor set generated by the Filtering UI Context component.


Speaking of the Filtering UI Context component, it has been refined as well. The most important enhancement is that it no longer requires you to build a filtering Model anymore. Instead, you associate a target control (e.g., a Grid View) with the component with a couple of clicks at design time and thereby instantly generate all the filtering UI editors required.

Other improvements include:

  • An ability to change editor types and settings directly at design-time
     

  • Automatic two-way binding: any filtering operation a user performs in the generated UI reflects within the data-aware control’s UI, and vice versa.

  • New filtering editor templates.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.