This Blog


Favorite Posts


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.

Published Nov 13 2017, 07:51 PM by
Filed under: , , ,
Bookmark and Share


Stepan Lauryn

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 :-).



November 13, 2017 12:36 PM

John Fedak

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

November 13, 2017 1:12 PM

Anurag Mahato

What about WPF?

November 13, 2017 7:50 PM

Alexander Krakhotko (Xafari team)

have plans to make it available in XAF Model Editor?

November 14, 2017 12:32 AM

Dennis (DevExpress Support)

@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.

November 14, 2017 1:59 AM

Ronnie Wilkins Jr

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.

November 14, 2017 8:07 AM

About Julian Bucknall (DevExpress)

Julian is the Chief Technology Officer at Developer Express. You can reach him directly at julianb@devexpress.com. You can also follow him on Twitter with the ID JMBucknall.

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners