SimpleColumnFilterPanel
Namespace: Wisej.Web.Ext.ColumnFilter
Assembly: Wisej.Web.Ext.ColumnFilter (4.1.0.0)
Simple column filter panel showing the unique values found in the bound column in a checked list box. The user can select multiple values, clear the selection or select all.
- C#
- VB.NET
public class SimpleColumnFilterPanel : ColumnFilterPanel
Public Class SimpleColumnFilterPanel
Inherits ColumnFilterPanel
Values are compared using the formatted value of the cells. The list is populated when the panel is shown and it's reloaded after the rows of the DataGridView change or are sorted. When no value or all the values are checked, the column is not filtered.
Example:
Using this panel with the ColumnFilter extender:
this.columnFilter1.FilterPanelType = typeof(SimpleColumnFilterPanel);
this.columnFilter1.SortItems = true;
this.columnFilter1.SetShowFilter(this.dataGridView1.Columns["Country"], true);
Constructors
SimpleColumnFilterPanel()
Initializes a new instance of the SimpleColumnFilterPanel class.
Properties
SortItems
Boolean: Returns or sets whether the list of values is sorted alphabetically.
Since 3.2.6 (Default: False)
When the panel is created by the ColumnFilter extender, this property is initialized from SortItems. The values are compared as formatted strings.
Methods
ApplyFilters()
Applies the filters registered with each column in the order of creation in the Columns collection.
Clear(applyFilters)
Clears the filter panel by unchecking all the values.
| Parameter | Type | Description |
|---|---|---|
| applyFilters | Boolean | True (default) to re-apply the filters of all the columns and close the panel. |
When no value is checked the column is not filtered.
Example:
Removing the filter from a specific column:
var panel = this.dataGridView1.Columns["Country"].UserData.FilterPanel as SimpleColumnFilterPanel;
panel?.Clear();
Dispose(disposing)
Clean up any resources being used.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | true if managed resources should be disposed; otherwise, false. |
OnAfterShow()
Invoked when the ColumnFilterPanel after is visible on the client.
OnApplyFilter()
Invoked when the ColumnFilterPanel should apply the filter criteria selected by the user.
Returns: Boolean. True to indicate that the filter has been applied. False if the filter has been cleared.
OnBeforeShow()
Invoked when the ColumnFilterPanel is shown but before it is visible on the client.
OnLoad(e)
Performs initialization tasks when the panel is created.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | Event arguments |