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.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Event Data
The FieldValueDisplayText event's data class is DevExpress.XtraReports.UI.PivotGrid.PivotFieldDisplayTextEventArgs.
Remarks
The FieldValueDisplayText event provides the ability to:
- customize the display text of field values, total headers, grand total headers and data field headers. In this case, the IsPopulatingFilterDropdown parameter is set to false;
- customize the display text of items within filter dropdowns. In this case, the IsPopulatingFilterDropdown parameter is set to true.
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.
Related GitHub Examples
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.