Client-Side API Reference > FlexGrid > wijmo.grid.filter > ColumnFilter Class |
constructor(owner: FlexGridFilter, column: Column): ColumnFilter
Initializes a new instance of the ColumnFilter class.
The FlexGridFilter that owns this column filter.
The Column to filter.
Gets or sets the DataMap used to convert raw values into display values shown when editing this filter.
The example below assigns a DataMap to Boolean column filters so the filter editor displays 'Yes' and 'No' instead of 'true' and 'false':
var filter = new wijmo.grid.filter.FlexGridFilter(grid), map = new wijmo.grid.DataMap([ { value: true, caption: 'Yes' }, { value: false, caption: 'No' }, ], 'value', 'caption'); for (var c = 0; c < grid.columns.length; c++) { if (grid.columns[c].dataType == wijmo.DataType.Boolean) { filter.getColumnFilter(c).dataMap = map; } }
Gets or sets the types of filtering provided by this filter.
Setting this property to null causes the filter to use the value defined by the owner filter's defaultFilterType property.
apply(value): boolean
Gets a value that indicates whether a value passes the filter.
The value to test.
clear(): void
Clears the filter.
Defines a filter for a column on a FlexGrid control.
The ColumnFilter contains a ConditionFilter and a ValueFilter; only one of them may be active at a time.
This class is used by the FlexGridFilter class; you rarely use it directly.