Skip to main content
A newer version of this page is available. .

How to: Apply Filter to a Field

The example below shows how to apply filtering to the ‘fieldTradeMark’ field by adding ‘Chevrolet’ or ‘Chrysler’ to the PivotGridFieldBase.FilterValues collection.

pivotGridControl.BeginUpdate();
try {
    fieldTrademark.FilterValues.Clear();
    fieldTrademark.FilterValues.FilterType = PivotFilterType.Included;
    fieldTrademark.FilterValues.Add("Chevrolet");
    fieldTrademark.FilterValues.Add("Chrysler");
}
finally {
    pivotGridControl.EndUpdate();
}