Back to Devexpress

PivotGridControl.CustomExportCell Event

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-343f72bf.md

latest10.3 KB
Original Source

PivotGridControl.CustomExportCell Event

Enables you to render different content for individual cells in a printed or exported document, if the control is exported in the WYSIWYG mode.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public event EventHandler<CustomExportCellEventArgs> CustomExportCell
vb
Public Event CustomExportCell As EventHandler(Of CustomExportCellEventArgs)

Event Data

The CustomExportCell event's data class is CustomExportCellEventArgs. The following properties provide information specific to this event:

PropertyDescription
AppearanceGets the appearance settings used to paint the cell currently being exported.
ApplyAppearanceToBrickStyleSpecifies whether to apply the appearance settings to a brick. Inherited from CustomPrintEventArgs.
BrickProvides access to the brick that represents the contents and appearance of a cell, when it is printed or exported. Inherited from CustomPrintEventArgs.
ColumnFieldGets the column field which corresponds to the current cell.
ColumnFieldIndexFor internal use. Inherited from CustomExportCellEventArgsBase.
ColumnIndexGets the visual index of the column that contains the current cell. Inherited from CustomExportCellEventArgsBase.
ColumnValueGets information about a column field value that corresponds to the current cell. Inherited from CustomExportCellEventArgsBase.
DataFieldGets the data field which identifies the column where the processed cell resides.
FocusedGets whether the processed cell is focused.
FormatTypeGets the type of formatting. Inherited from CustomExportCellEventArgsBase.
IsTextFitGets whether the processed cell text is entirely displayed. Inherited from CustomExportCellEventArgsBase.
RectDefines the size and location of the printed or exported cell. Inherited from CustomPrintEventArgs.
RowFieldGets the row field which corresponds to the current cell.
RowFieldIndexFor internal use. Inherited from CustomExportCellEventArgsBase.
RowIndexGets the visual index of the row that contains the current cell. Inherited from CustomExportCellEventArgsBase.
RowValueGets information about a row field value that corresponds to the current cell. Inherited from CustomExportCellEventArgsBase.
SelectedGets whether the processed cell is selected.
TextGets the text displayed within the processed cell. Inherited from CustomExportCellEventArgsBase.
ValueGets the processed cell value. Inherited from CustomExportCellEventArgsBase.

The event data class exposes the following methods:

MethodDescription
CreateDrillDownDataSource()Returns data records used to calculate a summary value for the current cell. Inherited from CustomExportCellEventArgsBase.
CreateDrillDownDataSource(List<String>)Returns data records used to calculate a summary value for the current cell. Allows you to specify data columns for the returned records. Inherited from CustomExportCellEventArgsBase.
CreateDrillDownDataSource(Int32, List<String>)Returns data records used to calculate a summary value for the current cell. Allows you to specify the data columns and limit the number of returned records. Inherited from CustomExportCellEventArgsBase.
CreateDrillDownDataSource(Int32)Returns data records used to calculate a summary value for the current cell. Allows you to limit the number of returned records. Inherited from CustomExportCellEventArgsBase.

Remarks

The CustomExportCell event is raised for each cell when the PivotGrid is being exported. You can handle this event to change the cell appearance and contents in a printed document.

Use the CustomExportCellEventArgs.Appearance parameter to specify the cell appearance and contents in a printed document such as background and foreground colors, font settings, etc.

Use the CustomExportCellEventArgsBase.ColumnIndex and CustomExportCellEventArgsBase.RowIndex parameters to obtain the position of the cells to be customized in a printed document. You can also change the cell appearance relying on the cell value or displayed text. To obtain the cell value or displayed text, use the CustomExportCellEventArgsBase.Value and CustomExportCellEventArgsBase.Text parameters, respectively.

The CustomExportCellEventArgs.Selected event parameter allows you to change the cell appearance in a printed document for selected cells.

Note

The CustomExportCell and PivotGridControl.CustomExportFieldValue events are not in effect during the export in Data-Aware mode. To customize cells in Data-Aware export mode, use the PivotXlsExportOptions.CustomizeCell and PivotXlsxExportOptions.CustomizeCell events.

See Also

Selecting Data Cells

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace