Filtering in Code
Filter the PivotGrid Data
Use the PivotGridControl.FilterString and PivotGridControl.FilterCriteria properties to apply a filter to the pivot grid.
End users can edit the filter criteria in the Filter Editor.
Filter the Field Values
Add filter values to the PivotGridField.FilterValues collection. The value type should equals the field’s type.
The FieldFilterValues.FilterType property determines whether the specified filter values should be displayed or hidden.
- To display filter values, set the FieldFilterValues.FilterType property to FieldFilterType.Included. The PivotGridControl displays records that contain the specified filter values.
- To hide filter values, set the FieldFilterValues.FilterType property to FieldFilterType.Excluded. The PivotGridField.FilterValues collection contains values that will be hidden within the pivot grid. The PivotGridControl does not display records that contain the specified filter values.
See Also