A newer version of this page is available. Switch to the current version.

XRPivotGrid.PrintCell Event

Enables you to render a different content for individual data cells.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll


public event EventHandler<CustomExportCellEventArgs> PrintCell
Public Event PrintCell As EventHandler(Of CustomExportCellEventArgs)

Event Data

The PrintCell event's data class is DevExpress.XtraReports.UI.PivotGrid.CustomExportCellEventArgs.


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.


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;
See Also