The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRPivotGrid.PrintHeader Event

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

Declaration

public event EventHandler<CustomExportHeaderEventArgs> PrintHeader
Public Event PrintHeader As EventHandler(Of CustomExportHeaderEventArgs)

Event Data

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

Remarks

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