Skip to main content

PivotGridControl.CustomFilterPopupItems Event

Allows you to customize the filter drop-down list items.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

#Declaration

public event PivotCustomFilterPopupItemsEventHandler CustomFilterPopupItems

#Event Data

The CustomFilterPopupItems event's handler receives an argument of the PivotCustomFilterPopupItemsEventArgs type. The following properties provide information specific to this event:

Property Description
Field Gets the field for which the event has been raised.
Handled Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
Items Gets the collection of filter items.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
ShowBlanksItem Gets the 'Show Blanks' filter item.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

#Remarks

The CustomFilterPopupItems event is raised when an end-user invokes the filter drop-down list. The event parameter's PivotCustomFilterPopupItemsEventArgs.Items property returns a collection of filter items. Elements of the collection are represented by the PivotGridFilterItem objects. Initially, the filter items collection contains items representing the unique values stored in the underlying data source, in the current field. To hide particular items from the filter drop-down, remove them from the collection.

You can also specify the check state of filter items using their PivotGridFilterItem.IsChecked property. The event parameter provides the PivotCustomFilterPopupItemsEventArgs.CheckAllItems method, which allows you to specify the check state of all filter items in the collection.

To obtain the field for which the filter drop-down is being populated, use the event parameter's PivotCustomFilterPopupItemsEventArgs.Field property.

The filter drop-down list contains the 'Show Blanks' item, used to control whether the data records that contain null values in the respective field are processed by the pivot grid. To access the 'Show Blanks' filter item, use the PivotCustomFilterPopupItemsEventArgs.ShowBlanksItem property.

NOTE

In the OLAP mode, the PivotCustomFilterPopupItemsEventArgs.ShowBlanksItem property returns null.

See Also