vcl-cxcustompivotgrid-a1e7e9c3.md
The text-related procedural type for data cells.
TcxPivotGridGetDisplayTextEvent = procedure(Sender: TcxPivotGridField; ACell: TcxPivotGridDataCellViewInfo; var AText: string) of object;
| Name | Type | Description |
|---|---|---|
| Sender | TcxPivotGridField |
The pivot grid field that raised the event.
| | ACell | TcxPivotGridDataCellViewInfo |
The target cell’s ViewInfo information.
| | AText | string |
The target cell’s display text.
|
Use the field’s DisplayFormat property to specify the format pattern for the target cell’s display text.
The following OnGetDisplayText event handler encloses the display text of each data cell in parentheses:
procedure TForm1.cxPivotGrid1Field1GetDisplayText(Sender: TcxPivotGridField;
ACell: TcxPivotGridDataCellViewInfo; var AText: string);
begin
AText := '(' + AText + ')';
end;
void TForm1::cxPivotGrid1Field1GetDisplayText(TcxPivotGridField *Sender,
TcxPivotGridDataCellViewInfo *ACell, UnicodeString &AText)
{
AText = "(" + AText + ")";
}
A pivot grid field’s OnGetDisplayText event references the TcxPivotGridGetDisplayTextEvent type.
See Also