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

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.

6 comment(s)

Hi Julina,

For me, the new filtering is nice and logical. But we have different experiences with customers :-(.

A month ago, we released the release of our product with version 17.1 components - new flutter conditions. Half of our customers wanted the old form of filtration. I had to make a hot fix, to turn on and off the form of filtration :-).

WBR

Stepan

13 November, 2017

Is this enabled by default (if not, what activates it?)

13 November, 2017

What about WPF?

13 November, 2017

have plans to make it available in XAF Model Editor?

14 November, 2017

@Alexander: Would you please list the exact use-case scenarios in the Model Editor where you would like to use this functionality and explain why? Thanks in advance.

14 November, 2017

Please make sure to keep the classic filtering mechanism.  I have a customer who hated the new Excel style filtering and I had to push update that set:

WindowsFormsSettings.ColumnFilterPopupMode = ColumnFilterPopupMode.Classic;

The newer Excel filtering is great when trying to mine unknown data, but for this customer the data is known and they just want a quick list to select filter value from.

14 November, 2017

Please login or register to post comments.