<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Marko Männik</title>
    <description>The latest articles on Forem by Marko Männik (@markoee_mnc).</description>
    <link>https://forem.com/markoee_mnc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3889597%2F50f053bf-329e-43f0-ac62-906a8f84a783.png</url>
      <title>Forem: Marko Männik</title>
      <link>https://forem.com/markoee_mnc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/markoee_mnc"/>
    <language>en</language>
    <item>
      <title>I built automatic filtering for WPF DataGrid because I was tired of doing it manually</title>
      <dc:creator>Marko Männik</dc:creator>
      <pubDate>Mon, 20 Apr 2026 19:56:33 +0000</pubDate>
      <link>https://forem.com/markoee_mnc/i-built-automatic-filtering-for-wpf-datagrid-because-i-was-tired-of-doing-it-manually-43o</link>
      <guid>https://forem.com/markoee_mnc/i-built-automatic-filtering-for-wpf-datagrid-because-i-was-tired-of-doing-it-manually-43o</guid>
      <description>&lt;h1&gt;
  
  
  I built automatic filtering for WPF DataGrid because I was tired of doing it manually
&lt;/h1&gt;

&lt;h1&gt;
  
  
  dotnet #csharp #wpf #opensource #showdev
&lt;/h1&gt;

&lt;p&gt;For years I’ve been working with WPF, and one thing that always slowed me down was adding proper filtering to a DataGrid.&lt;br&gt;&lt;br&gt;
Every project needed the same boilerplate again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;custom templates
&lt;/li&gt;
&lt;li&gt;converters
&lt;/li&gt;
&lt;li&gt;event handlers
&lt;/li&gt;
&lt;li&gt;manual filter UI
&lt;/li&gt;
&lt;li&gt;edge cases for string, dates, numbers, booleans, guids, timespans
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At some point I realized I was rewriting the same thing for the 10th time.&lt;br&gt;&lt;br&gt;
So I finally decided to build a reusable solution.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AutoFilterWpfDataGrid&lt;/strong&gt; is a WPF component that adds &lt;strong&gt;automatic, type‑aware filters&lt;/strong&gt; to every DataGrid column with zero manual UI work.&lt;/p&gt;

&lt;p&gt;It detects column types and generates the right filter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;string → contains / equals
&lt;/li&gt;
&lt;li&gt;numbers → range filters
&lt;/li&gt;
&lt;li&gt;dates → date pickers
&lt;/li&gt;
&lt;li&gt;booleans → tri‑state
&lt;/li&gt;
&lt;li&gt;enums → dropdown
&lt;/li&gt;
&lt;li&gt;nullable types → include/exclude blank values
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No templates, no converters, no custom controls.&lt;/p&gt;

&lt;p&gt;Just:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;AutoFilterDataGrid ItemsSource="{Binding MyItems}" /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;…and the filters appear automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I built it
&lt;/h2&gt;

&lt;p&gt;I wanted something that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;works out of the box
&lt;/li&gt;
&lt;li&gt;looks clean
&lt;/li&gt;
&lt;li&gt;doesn’t require writing UI
&lt;/li&gt;
&lt;li&gt;handles common data types
&lt;/li&gt;
&lt;li&gt;is fast enough for real applications
&lt;/li&gt;
&lt;li&gt;doesn’t bring in huge dependencies
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most existing solutions were either too heavy, too old, or too complex.&lt;br&gt;&lt;br&gt;
I wanted something simple and modern.&lt;/p&gt;




&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;The component inspects the DataGrid columns, determines the underlying property types, and injects filter controls into the column headers.&lt;br&gt;&lt;br&gt;
Filtering is applied through a lightweight expression engine that updates the view in real time.&lt;/p&gt;

&lt;p&gt;It also supports optional numeric summaries (you can turn it off or use your custom map), custom header map also available.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where to find it
&lt;/h2&gt;

&lt;p&gt;GitHub: &lt;strong&gt;&lt;a href="https://github.com/MarkoMannik/AutoFilterWpfDataGrid" rel="noopener noreferrer"&gt;https://github.com/MarkoMannik/AutoFilterWpfDataGrid&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
NuGet: &lt;strong&gt;dotnet add package AutoFilterWpfDataGrid&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The core functionality is free and open-source.&lt;br&gt;&lt;br&gt;
There’s also a small PRO version for advanced use cases.&lt;/p&gt;




</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
