XRPivotGrid.PrintCell Event
Enables you to render a different content for individual data cells.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.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 Look and Feel.
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;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PrintCell event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.