Creating Advanced Filter UIs in WPF Using FilterEditor and DataFilter

Creating Advanced Filter UIs in WPF Using FilterEditor and DataFilter

In this article, we will describe how FilterEditor and DataFilter can be used to provide dynamic and advanced filtering in an application.

In the 2020v2 release of ComponentOne we added a FilterEditor control for WPF, which provides an intuitive UI for filtering data sources at run time. This post demonstrates how we can integrate the FilterEditor for WPF with the C1DataFilter control to create rule-based filtering for an e-mail client application. Using the filter editor to create rule-based filtering, we'll see how a user can break down a large data set (i.e., the list of e-mails here) into a hierarchical tree of logically formed nodes. Each node corresponds to smaller, related, and more manageable datasets.

Creating Advanced Filter UIs in WPF Using FilterEditor and DataFilter

In this blog, we will first have a quick look at the FilterEditor structure. After that, we will cover

  • Creating the models required for the MailBox.
  • Creating the RuleEditor using the FilterEditor control.
  • Creating the RuleTree to be displayed in the DataFilter.
  • Integrating the RuleTree with a custom filter (named RuleBasedFilter) for the DataFilter.
  • Adding the custom filter to the DataFilter control.

FilterEditor for WPF: A Review of the Structure

The following image shows what the FilterEditor control looks like:

Creating Advanced Filter UIs in WPF Using FilterEditor and DataFilter

It displays a tree of filter nodes where each node represents either a Combination or an Operation expression. These are the building blocks for creating any filter criteria for our data source at runtime. You can read more about the FilterEditor structure from the documentation and this blog. Next, let's look at the mailbox that we'll be creating.

.net desktop

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

ML.NET Model Builder is now a part of Visual Studio | .NET Blog

ML.NET is a cross-platform, machine learning framework for .NET developers. Model Builder is the UI tooling in Visual Studio that uses Automated Machine Learning (AutoML) to train and consume custom ML.NET models in your .NET apps. You can use ML.NET and Model Builder to create custom machine learning models without having prior machine learning experience and without leaving the .NET ecosystem.

Hire ASP.Net Developers

Looking to outsource your asp dot net development requirement? ASP.Net is a special feature of the DOT Net framework created by Microsoft. At [HourlyDeveloper.io](https://hourlydeveloper.io/ "HourlyDeveloper.io"), we have a team of experienced...

Index is not an attribute class – Error while migrating from ASP.Net MVC 5 to .Net Core

Recently one of my friends was migrating a project from ASP.Net MVC 5 to ASP.Net core 3.1. One of the challenges he faced is with the Index Attribute in data annotations. The .Net Core is not …

.NET Core .NET Framework|teratail

前提・実現したいこと.NET Coreから.NET Frameworkへの移植 発生している問題・エラーメッセージ「.NET Framework」から「.NET Core」の移植方法については方法が見つかったのですがその逆はなかなか見つからず。。。