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

End-User Filtering

  • 2 minutes to read

End-users can build simple filter criteria and apply them using a Filter Window. If a field’s PivotGridFieldOptions.AllowFilter option is enabled, an end-user can invoke this window by clicking a filter button displayed in a field header.

veFilter

A filter window contains unique field values. These values can be obtained via the PivotGridFieldBase.GetUniqueValues method.

Note

End-users cannot change the filtering applied to data fields.

To create complex filter criteria, use the Prefilter.

Availability

You can prevent end-users from applying or changing filtering at runtime by hiding filter buttons from field headers.

To hide filter buttons from all field headers, set the PivotGridOptionsCustomization.AllowFilter property to false. You can also do this for individual fields via their PivotGridFieldOptions.AllowFilter properties.

Note that this does not affect filtering in code.

Displaying Only Available Filter Items

By default, a filter drop-down window invoked for a particular field contains all the unique field values, although some of these values may actually be excluded from the pivot grid by filtering applied to other fields.

Assume that a pivot grid contains two dimension fields: Category Name and Product Name.

ShowOnlyAvailableItems_PivotGrid

If you choose only one product category from the Category Name filter drop-down, all products related to other categories will be excluded from the pivot grid. This means that whether you check or uncheck any of these products in the Product Name filter drop-down, this will have no effect, since they are hidden by category filtering.

ASPxPivotGrid allows you to remove such field values from filter drop-downs. To do this, set the PivotGridOptionsFilterBase.ShowOnlyAvailableItems property to true.

The image below illustrates the property effect.

ShowOnlyAvailableFilterItems

See Also