ColumnFilter
Last updated
Last updated
The ColumnFilter extender component allows you to add row filtering to your DataGridViews. It includes 2 ready made FilterPanels.
Supports three kinds of column filters
SimpleColumnFilter. Displays a list of all distinct values of the column
WhereColumnFilter. Lets you set up Where conditions depending on the DataType of the column.
CustomColumnFilter. You build your own filter panel.
The ColumnFilter extension can be added to a Wisej project using NuGet Package Manager.
When using the WhereColumnFilter you need to also add a reference to System.Linq.Dynamic
You can set up a different image (or same image in a different color) that is displayed when the column is filtered.
More than one ColumnFilter can be dropped on a DataGridView´s container.
This filter panel adapts to the ValueType that has been set for the column and that determines which operators are displayed. Multiple conditions can be selected and users can control if those are combined with AND or OR.
The SimpleColumnFilter loads a list with all distinct values of the column. You can select/deselect multiple columns, select all, or clear the list.
You can also use the ColumnFilter extension filter as a base to implement your own custom filter by providing code to the following events or override the functions:
Event/Function | Usage |
---|---|
Load | Fired when the ColumnFilter loads (just once). Can be used for initalizations. |
BeforeShow | Fired everytime before the Panel is actually shown. Load values or set up conditions.. |
AfterShow | Fired everytime when the Panel is visible on the client. Populate lists. |
ApplyFilters | Override to control the implementation of all your filters |
ApplyFilter | Fired for each filter. Perform the actual filtering here. |
RowsFiltered | Fired for each filter. Includes the number of visible rows in the event args. |