XRPivotGrid.PrintHeader Event
Enables you to render a different content for individual field headers.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Event Data
The PrintHeader event's data class is DevExpress.XtraReports.UI.PivotGrid.CustomExportHeaderEventArgs.
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.
Example
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