Skip to main content

PivotGridControl.CustomExportHeader Event

Enables you to render different content for individual field headers in a printed or exported document, if the control is exported in the WYSIWYG mode.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid


public event EventHandler<CustomExportHeaderEventArgs> CustomExportHeader

Event Data

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

Property Description
Appearance Gets or sets the appearance object used to paint the current header.
ApplyAppearanceToBrickStyle Specifies whether to apply the appearance settings to a brick. Inherited from CustomPrintEventArgs.
Brick Provides access to the brick that represents the contents and appearance of a cell, when it is printed or exported. Inherited from CustomPrintEventArgs.
Caption Gets the processed field caption. Inherited from CustomExportHeaderEventArgsBase<T>.
Field Gets the processed field. Inherited from CustomExportHeaderEventArgsBase<T>.
Rect Defines the size and location of the printed or exported cell. Inherited from CustomPrintEventArgs.


The CustomExportHeader event is raised for each field when the PivotGrid is being exported. You can handle this event to change the field header appearance and contents in a printed document.

Use the CustomExportHeaderEventArgs.Appearance property to specify the appearance of the field header such as background and foreground colors, font settings, etc.

Use the event parameter CustomExportHeaderEventArgsBase<T>.Field property to obtain the field header that needs to be customized. You can use the CustomExportHeaderEventArgsBase<T>.Caption property to identify the field header by its caption.


The CustomExportHeader event is not in effect during the export in Data-Aware mode. To customize cells in Data-Aware export mode, use the PivotXlsExportOptions.CustomizeCell and PivotXlsxExportOptions.CustomizeCell events.

See Also