JVCL Help:TJvCustomCsvDataSet.SetFilter
JVCL Help: TJvCustomCsvDataSet.SetFilter Method
Search in JVCL Help
Search in all projectsSummary
Make only certain rows in a dataset visible.
Pascal
procedureSetFilter(constFieldName: string; Pattern: string);
Parameters
Parameters | Description |
const FieldName: string | This must be a field name that exists in the file. |
Pattern: string | This is a pattern, with optional wildcards, that the Field value must match. |
Description
This allows simple master-detail or category-by-category behavior to be emulated, where changing rows in one dataset (scrolling) could be used to set filtering on a second dataset. To filter on more than one field, you first ClearFilter, then you call SetFilter several times, each time, the dataset is scanned once, and non-matching rows are marked hidden. When the user views the dataset, only the matching rows are viewed. The patterns can contain wildcards, such as '%' for AnyString, or '?' for matching any Single Character. These wildcards were chosen because they are similar to the wildcards used in SQL Databases.
A very specialized feature is the ability to check for several different values, by combining the values with a vertical-pipe (|) symbol. To match a string that starts with either A or B or C, use the pattern 'A%|B%|C%
Note that this feature is NOT API-compatible with or similar to the filtering feature that is normally found in VCL TTable component.
See Also
TJvCustomCsvDataSet.ClearFilter
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page