windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-8ccccaa4.md
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
[DXCategory("Appearance")]
public event FilterPopupExcelCustomizeTemplateEventHandler FilterPopupExcelCustomizeTemplate
<DXCategory("Appearance")>
Public Event FilterPopupExcelCustomizeTemplate As FilterPopupExcelCustomizeTemplateEventHandler
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. |
The FilterPopupExcelCustomizeTemplate event is raised each time an end-user invokes the Excel-style filter popup and allows you to customize its template.
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;
}
}
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