Back to Devexpress

PivotGridControl.CustomExportFieldValue Event

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-e04fa1f4.md

latest9.5 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public event EventHandler<CustomExportFieldValueEventArgs> CustomExportFieldValue
vb
Public Event CustomExportFieldValue As EventHandler(Of CustomExportFieldValueEventArgs)

Event Data

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

PropertyDescription
AppearanceGets or sets the appearance object used to paint the current field value.
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.
CustomTotalGets a custom total to which the processed field value corresponds.
DataFieldGets the data field that specifies the processed value. Inherited from CustomExportFieldValueEventArgsBase<T>.
EndLevelGets 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>.
FieldGets a field whose value is being processed. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsCollapsedGets whether the processed field value is collapsed. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsColumnGets whether the processed value corresponds to a column field. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsOthersValueGets whether the processed value corresponds to the “Others” row/column. Inherited from CustomExportFieldValueEventArgsBase<T>.
IsTopMostGets whether the processed field value resides within the top most row or column. Inherited from CustomExportFieldValueEventArgsBase<T>.
MaxIndexGets 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>.
MinIndexGets 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>.
RectDefines the size and location of the printed or exported cell. Inherited from CustomPrintEventArgs.
StartLevelGets 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>.
TextGets the processed field value display text. Inherited from CustomExportFieldValueEventArgsBase<T>.
ValueGets the processed field value. Inherited from CustomExportFieldValueEventArgsBase<T>.
ValueTypeGets the type of the currently processed field value. Inherited from CustomExportFieldValueEventArgsBase<T>.

The event data class exposes the following methods:

MethodDescription
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

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace