Modular extensions for the DataGrid control.
Now also available on NuGet (DGX, http://nuget.org/packages/DataGridExtensions).

This package contains useful extensions for the MS DataGrid (System.Windows.Controls.DataGrid).
The current version supports the following features and behaviors:
  • Add filtering capabilities to the DataGrid.
  • Apply the initial sorting
  • Disable another control while in editing mode
  • Provide additional column events
  • Start editing a cell with Ctrl+Enter
  • Provide an extended star-size column behavior

Every feature is individually configurable.

This extension is
  • Easy to use
  • Easy to customize
  • Attaches to the existing DataGrid
Unlike many other free extensions this package does not introduce a new derived DataGrid class, limiting you a fixed set of features that you have to live with, but transparently attaches to the existing DataGrid, giving you the freedom to use exactly the feature you need, customizing them as you like, and combining them with other useful extensions.

Filtering is enabled by simply adding one attached property to your DataGrid:
<DataGrid ItemsSource="{Binding Items}" dgx:DataGridFilter.IsAutoFilterEnabled="True"/>
You will get a simple but efficient text or boolean filter, depending on the column type:
Sample1.jpg

Every part is easily customizable by providing simple styles or templates:
<DataGridTextColumn Header="Double/Custom" Binding="{Binding Probability, Mode=OneWay}" dgx:DataGridFilterColumn.Template="{StaticResource FilterWithPopup}"/>
By overriding the default template you can simply create individual filters:
Sample2.jpg

For a full functional demo run the sample app or see the http://comregistrybrowser.codeplex.com or http://resxresourcemanager.codeplex.com projects that use the filtering extensions.

Support the Open Source Community.
Donate

Powered by ReSharper Code Contracts

Last edited Apr 21 at 4:10 PM by tomenglert, version 15