XRPivotGrid.PrintCell Event
Enables you to render a different content for individual data cells.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v19.1.dll
NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core
Declaration
Event Data
The PrintCell event's data class is DevExpress.XtraReports.UI.PivotGrid.CustomExportCellEventArgs.
Remarks
The PrintCell event is raised for each cell when the XRPivotGrid is being printed. You can handle this event to change the cell’s appearance and contents in a printed document.
Example
This example demonstrates how to change the appearance of Pivot Grid cells based on their values, using the XRPivotGrid.PrintCell
event.
To learn more, see Appearance Inheritance Options.
using System;
using System.Drawing;
using DevExpress.XtraReports.UI;
// ...
private void xrPivotGrid1_PrintCell(object sender,
CustomExportCellEventArgs e) {
if (e.ColumnIndex == 1 && Convert.ToDouble(e.Value) > 50)
e.Appearance.BackColor = Color.AliceBlue;
}