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
both have reference to the AdventureWorks2008R2 Database. To use this example you will need to change the following line to reference your Database
<add name="AdventureWorksEntities" connectionString="metadata=res://*/AdventureWorksModel.csdl|res://*/AdventureWorksModel.ssdl|res://*/AdventureWorksModel.msl;provider=System.Data.SqlClient;provider connection string="data
;initial catalog=AdventureWorks2008R2;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" 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.
- Alternative comparison operators.
- Filtering of DateTime datatype be years, days, hours, minutes and seconds.
- Tweaking the filters performance.
- Implement the test project the utilizes Datasets with similiar filtering.
- 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
- Precompile as much of each derived dataItems FilterAsExpression code during object construction.
WPFSearchDataGrid is released under the GNU license.