Back to Devexpress

TcxPivotGridGetDisplayTextEvent Type

vcl-cxcustompivotgrid-a1e7e9c3.md

latest1.7 KB
Original Source

TcxPivotGridGetDisplayTextEvent Type

The text-related procedural type for data cells.

Declaration

delphi
TcxPivotGridGetDisplayTextEvent = procedure(Sender: TcxPivotGridField; ACell: TcxPivotGridDataCellViewInfo; var AText: string) of object;

Parameters

NameTypeDescription
SenderTcxPivotGridField

The pivot grid field that raised the event.

| | ACell | TcxPivotGridDataCellViewInfo |

The target cell’s ViewInfo information.

| | AText | string |

The target cell’s display text.

|

Remarks

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:

delphi
procedure TForm1.cxPivotGrid1Field1GetDisplayText(Sender: TcxPivotGridField;
  ACell: TcxPivotGridDataCellViewInfo; var AText: string);
begin
  AText := '(' + AText + ')';
end;
cpp
void TForm1::cxPivotGrid1Field1GetDisplayText(TcxPivotGridField *Sender,
  TcxPivotGridDataCellViewInfo *ACell, UnicodeString &AText)
{
  AText = "(" + AText + ")";
}

A pivot grid field’s OnGetDisplayText event references the TcxPivotGridGetDisplayTextEvent type.

See Also

cxCustomPivotGrid Unit