Defines a value filter for a column on a FlexGrid control.
Value filters contain an explicit list of values that should be displayed by the grid.
Gets the Column to filter.
Gets or sets the DataMap used to convert raw values into display values shown when editing this filter.
Gets or sets a value that determines whether the filter should include only values selected by the filterText property.
This property is set to true by default, which matches Excel's behavior.
Set it to false to disable this behavior, so searching only affects which items are displayed on the list and not which items are included in the filter.
Gets or sets a string used to filter the list of display values.
Gets a value that indicates whether the filter is active.
The filter is active if there is at least one value is selected.
Gets or sets the maximum number of elements on the list of display values.
Adding too many items to the list makes searching difficult and hurts performance. This property limits the number of items displayed at any time, but users can still use the search box to filter the items they are interested in.
This property is set to 250 by default.
This code changes the value to 1,000,000, effectively listing all unique values for the field:
// change the maxItems property for the 'id' column: var f = new wijmo.grid.filter.FlexGridFilter(s); f.getColumnFilter('id').valueFilter.maxValues = 1000000;
Gets or sets an object with all the formatted values that should be shown on the value list.
Gets or sets a value that determines whether the values should be sorted when displayed in the editor.
This property is especially useful when you are using the uniqueValues to provide a custom list of values property and you would like to preserve the order of the values.
Gets or sets an array containing the unique values to be displayed on the list.
If this property is set to null, the list will be filled based on the grid data.
Explicitly assigning the list of unique values is more efficient than building the list from the data, and is required for value filters to work properly when the data is filtered on the server (because in this case some values might not be present on the client so the list will be incomplete).
By default, the filter editor will sort the unique values when displaying them to the user. If you want to prevent that and show the values in the order you provided, set the sortValues property to false.
For example, the code below provides a list of countries to be used in the ValueFilter for the column bound to the 'country' field:
// create filter for a FlexGrid var filter = new wijmo.grid.filter.FlexGridFilter(grid); // assign list of unique values to country filter var cf = filter.getColumnFilter('country'); cf.valueFilter.uniqueValues = countries;
Gets a value that indicates whether a value passes the filter.
The value to test.
Clears the filter.
Returns true if the caller queries for a supported interface.
Name of the interface to look for.