Data filtering in grids is usually of two types:
- Header-Based Filter: A filter icon appears over each column that has a filter applied to it. Users may see and edit the filters by clicking the filter icon. This is the mechanism used by Windows 7/Vista and by the C1FlexGrid control. The main benefits of this type of filter are: (1) the user can see which columns are being filtered, (2) the filtering does not require extra real estate on the screen, and (3) this type of filter allows for better filter editors and easier customization.
- Filter Row: A filter row remains always visible and allows users to type values or expressions directly into the row. The main benefit of this type of filter is that users can always see which columns are being filtered and what the current filter criteria are. The main disadvantage is that the filter takes up some real estate and may interfere with the regular grid operation. Although filter rows are not built into the C1FlexGrid control, implementing them is relatively easy. We provide a FilterRow sample that shows how to do it.
The code samples presented below were mostly taken from two new samples included with the product: ColumnFilters and CustomFilters. Please refer to the samples for complete projects that show the features in action.
See Also