Back to Devexpress

PivotGridControl.FilterPopupExcelCustomizeTemplate Event

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-8ccccaa4.md

latest3.7 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
[DXCategory("Appearance")]
public event FilterPopupExcelCustomizeTemplateEventHandler FilterPopupExcelCustomizeTemplate
vb
<DXCategory("Appearance")>
Public Event FilterPopupExcelCustomizeTemplate As FilterPopupExcelCustomizeTemplateEventHandler

Event Data

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

PropertyDescription
FieldGets 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.

csharp
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;
    }
}
vb
Imports DevExpress.XtraEditors
Imports DevExpress.Utils.Filtering
' ...
Private pivotGridControl.FilterPopupExcelCustomizeTemplate += AddressOf OnFilterPopupExcelCustomizeTemplate
' ...
Private Sub OnFilterPopupExcelCustomizeTemplate(ByVal sender As Object, ByVal e As FilterPopupExcelCustomizeTemplateEventArgs)
    If e.Field = fieldTrademark Then
        Dim listBoxControl As CheckedListBoxControl = e.GetValuesListBox()
        listBoxControl.Appearance.BackColor = Color.AliceBlue
    End If
End Sub

See Also

FilterPopupExcelCustomizeTemplate

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace