XRPivotGrid.PrintHeader Event

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.1.dll

Syntax

public event EventHandler<CustomExportHeaderEventArgs> PrintHeader

The event handler receives an argument of the DevExpress.XtraReports.UI.PivotGrid.CustomExportHeaderEventArgs type.

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.

Examples

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