Skip to main content

PivotGridControl.CustomExportFieldValue Event

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

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

public event EventHandler<CustomExportFieldValueEventArgs> CustomExportFieldValue

Event Data

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

Property Description
Appearance Gets or sets the appearance object used to paint the current field value.
ApplyAppearanceToBrickStyle Specifies whether to apply the appearance settings to a brick. Inherited from CustomPrintEventArgs.
Brick Provides access to the brick that represents the contents and appearance of a cell, when it is printed or exported. Inherited from CustomPrintEventArgs.
CustomTotal Gets a custom total to which the processed field value corresponds.
DataField Gets the data field that specifies the processed value. Inherited from CustomExportFieldValueEventArgsBase<T>.
EndLevel Gets the maximum row level (for row fields) or column level (for column fields) that corresponds to the field value currently being processed. Inherited from CustomExportFieldValueEventArgsBase<T>.
Field Gets a field whose value is being processed. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsCollapsed Gets whether the processed field value is collapsed. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsColumn Gets whether the processed value corresponds to a column field. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsOthersValue Gets whether the processed value corresponds to the “Others” row/column. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsTopMost Gets whether the processed field value resides within the top most row or column. Inherited from CustomExportFieldValueEventArgsBase<T>.
MaxIndex Gets the maximum row index (for row fields) or column index (for column fields) that corresponds to the field value currently being processed. Inherited from CustomExportFieldValueEventArgsBase<T>.
MinIndex Gets the minimum row index (for row fields) or column index (for column fields) that corresponds to the field value currently being processed. Inherited from CustomExportFieldValueEventArgsBase<T>.
Rect Defines the size and location of the printed or exported cell. Inherited from CustomPrintEventArgs.
StartLevel Gets the minimum row level (for row fields) or column level (for column fields) that corresponds to the field value currently being processed. Inherited from CustomExportFieldValueEventArgsBase<T>.
Text Gets the processed field value display text. Inherited from CustomExportFieldValueEventArgsBase<T>.
Value Gets the processed field value. Inherited from CustomExportFieldValueEventArgsBase<T>.
ValueType Gets the type of the currently processed field value. Inherited from CustomExportFieldValueEventArgsBase<T>.

The event data class exposes the following methods:

Method Description
ContainsLevel(Int32) Returns whether the specified row or column level corresponds to the processed field value. Inherited from CustomExportFieldValueEventArgsBase<T>.

Remarks

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

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

Use the CustomExportFieldValueEventArgsBase<T>.Value event parameter to obtain field values whose appearance and contents need to be changed in a printed document. You can identify the type of field value by using the CustomExportFieldValueEventArgsBase<T>.ValueType parameter.

Note

The CustomExportFieldValue and PivotGridControl.CustomExportCell 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