WPFSearchDataGrid is an easy to use .NET control. WPFSearchDataGrid gives end users the ability to build a datagrid filter using single or multiple columns.

WPFSearchDataGrid is adapted from a WinForms project we currently use in production. This is my first attempt at WPF so the code is a little rough.

Be advised the WPFSearchDataGrid_Dal uses AdventureWorks2008R2 from the following link

The following files WPFSearchDataGridDAL/App.Config and WPFSearchDataGridTest/App.Config both have reference to the AdventureWorks2008R2 Database. To use this example you will need to change the following line to reference your Database servers connection.

<add name="AdventureWorksEntities" connectionString="metadata=res://*/AdventureWorksModel.csdl|res://*/AdventureWorksModel.ssdl|res://*/AdventureWorksModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=ProdSQL;initial catalog=AdventureWorks2008R2;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient"/>

I've uploaded this project hoping the community will contribute to the ongoing development.

To date the following has not been implemented from the existing WinForms control.

  1. Alternative comparison operators.
  2. Filtering of DateTime datatype be years, days, hours, minutes and seconds.
  3. Tweaking the filters performance.
  4. Implement the test project the utilizes Datasets with similiar filtering.
  5. Existing WinForms project also included a TotalsDataGrid which appears beneath the parent grid and allows for the display of custom column calculations

The following are some potential Improvements

  1. Precompile as much of each derived dataItems FilterAsExpression code during object construction.

Screen Shot


WPFSearchDataGrid is released under the GNU license.

Last edited Jan 22, 2013 at 2:54 PM by muscleman71, version 17