Skip to main content

PivotGridControl.FilterPopupExcelCustomizeTemplate Event

Allows you to customize templates used by Excel-style filter popups and external editors generated using Filtering UI Context.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

[DXCategory("Appearance")]
public event FilterPopupExcelCustomizeTemplateEventHandler FilterPopupExcelCustomizeTemplate

Event Data

The FilterPopupExcelCustomizeTemplate event's data class is FilterPopupExcelCustomizeTemplateEventArgs. The following properties provide information specific to this event:

Property Description
Field Gets the Pivot Grid field for which the event is raised.

Remarks

The FilterPopupExcelCustomizeTemplate event is raised each time an end-user invokes the Excel-style filter popup and allows you to customize its template.

Example

The code snippet below shows how to use the PivotGridControl.FilterPopupExcelCustomizeTemplate event to customize the underlying CheckedListBoxControl used to filter data within the Excel-style filter popup. In this example, the FilterPopupExcelCustomizeTemplate event is used to change the background color of the ‘fieldTrademark’ filter popup.

using DevExpress.XtraEditors;
using DevExpress.Utils.Filtering;
// ...
pivotGridControl.FilterPopupExcelCustomizeTemplate += OnFilterPopupExcelCustomizeTemplate;
// ...
private void OnFilterPopupExcelCustomizeTemplate(object sender, FilterPopupExcelCustomizeTemplateEventArgs e) {
    if (e.Field == fieldTrademark) {
        CheckedListBoxControl listBoxControl = e.GetValuesListBox();
        listBoxControl.Appearance.BackColor = Color.AliceBlue;
    }
}
See Also