Skip to main content

How to: Prevent End-Users From Changing Filter Conditions

The following example shows how to prevent end-users from changing the filter condition.

In this example, the PivotGridControl.FieldFilterChanging event is handled to prevent an end-user from hiding the 'UK' field value. If an end-user tries to hide the 'UK' field value, the event handler sets the event parameter's PivotFieldFilterChangingEventArgs.Cancel property to true to cancel changing the filter condition.