Skip to main content

XRPivotGrid.FieldValueDisplayText Event

Enables the display text of individual column and row headers and filter dropdown items to be customized.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v23.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public event EventHandler<PivotFieldDisplayTextEventArgs> FieldValueDisplayText

Event Data

The FieldValueDisplayText event's data class is DevExpress.XtraReports.UI.PivotGrid.PivotFieldDisplayTextEventArgs.

Remarks

The FieldValueDisplayText event provides the ability to:

If the FieldValueDisplayText event is raised for a field value or total header, the Field parameter identifies the corresponding column field or row field. If this event is raised for a data field header, the Field parameter identifies the corresponding data field. If the FieldValueDisplayText event is raised for a grand total header, the Field property will return null. To get the type of the currently processed header, use the PivotFieldValueEventArgsBase`1.ValueType property.

If the FieldValueDisplayText event is fired for an item within a filter dropdown, the Field parameter returns the column, row or filter field whose dropdown has been invoked.

To supply custom display text for a header or filter dropdown’s item, assign a custom string to the DisplayText parameter.

It’s also possible to specify the settings used to format field values and the display text within total headers via the PivotGridFieldBase.ValueFormat, PivotGridFieldBase.TotalValueFormat and PivotGridCustomTotalBase.Format properties. So, handle the FieldValueDisplayText event if these properties don’t suit your needs.

Use the XRPivotGrid.CustomCellDisplayText event or PivotGridFieldBase.CellFormat property to customize the display text of cells.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FieldValueDisplayText 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.

See Also