WPF Data Grid and TreeList – Data Analysis and Conditional Formatting Filters (v19.2)

WPF Team Blog
24 October 2019

The newest versions of our WPF Data Grid and TreeList controls ship with two advanced filter options. As you’ll soon see, Data Analysis filters and Conditional Formatting filters allow users to quickly analyze information within the Data Grid without constructing complex queries/filter conditions.

Data Analysis Filters

We now support the following numerical filters within the DevExpress WPF Data Grid and WPF Tree List:

  • Top / Bottom N
  • Above / Below Average
  • Unique / Duplicate

To appreciate the value of this new capability, let’s consider a Data Grid populated with financial data (by State):

Demo Link

Goal: Display Top 10 States with the Highest Profit Margin

As you can see in this image, our objective was to display a list of Top 10 most profitable states. Achieving this result was easy – we simply activated the Profit column’s drill-down filter and applied the Top N filter rule:

As you would expect, the same filter can be applied in code:

grid.FilterString = "[#TopItems]([Profit], 10)";

Goal: Display a List of States with Above Average Customer Satisfaction

To limit records based on states with above average customer feedback, we navigated to the Customer Satisfaction column’s drill-down filter and applied the Above Average filter rule:

Once again, the same result can be applied in code:

grid.FilterString = "[#AboveAverage]([CustomerSatisfaction])";

Documentation: Data Analysis Filters

Conditional Formatting Filters

The WPF Data Grid above included Conditional Formatting rules. Our most recent release (v19.2) allows you to apply filters based on these rules.

To get started, simply open a column’s drop-down filter and select Format condition filters. The drop-down filter will display rules for the selected column. Select the appropriate rule and our WPF Data Grid will apply the corresponding filter:

Documentation: Conditional Formatting Filters

Your Feedback Matters

We’d love to know your thoughts on these new features. If you’re using our Data Grid and TreeList, feel free to comment below and share your usage experiences with the entire DevExpress community.

no comments
No Comments

Please login or register to post comments.