XRPivotGrid.PrintHeader Event

Enables you to render a different content for individual field headers.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.2.dll


public event EventHandler<CustomExportHeaderEventArgs> PrintHeader

Event Data

The PrintHeader event's data class is DevExpress.XtraReports.UI.PivotGrid.CustomExportHeaderEventArgs.


The PrintHeader event is raised for each field when the XRPivotGrid is being printed. You can handle this event to change the field header’s appearance and contents in a printed document.


This example demonstrates how to change the appearance of Pivot Grid headers, based on their captions, using the XRPivotGrid.PrintHeader event.

using System;
using System.Drawing;
using DevExpress.XtraPivotGrid;
using DevExpress.XtraReports.UI;
// ...

private void xrPivotGrid1_PrintHeader(object sender, DevExpress.XtraReports.UI.PivotGrid.CustomExportHeaderEventArgs e) {
    if (e.Caption == "Country") 
        e.Appearance.BackColor = Color.Yellow;
See Also