Back to Devexpress

TcxCustomPivotGrid.OnCompare Event

vcl-cxcustompivotgrid-dot-tcxcustompivotgrid-c37e3ef1.md

latest1.9 KB
Original Source

TcxCustomPivotGrid.OnCompare Event

Fires when the sorting operation on column field values or row field values is performed.

Declaration

delphi
property OnCompare: TcxPivotGridCompareEvent read; write;

Remarks

Implement the OnCompare event handler to provide the custom comparator for the AValue1 and AValue2 values.

The Sender parameter specifies the pivot grid, which the sorting operation is processed for.

The AField parameter specifies the field, which owns the values to be compared.

The AValue1 and AValue2 parameters specify the values to be compared.

The Compare parameter specifies the result of comparison. If sorting in ascending order, the parameter should take the following values:

ValueDescription
1AValue1 is greater than AValue2.
0AValue1 and AValue2 are equal.
-1AValue1 is less than AValue2.

For descending order reverse the sign.

Note

The OnCompare event fires only in standard data binding modes. In OLAP mode, the sorting operation is performed as specified by the dimension SortMode property settings.

See Also

TcxPivotGridField.SortBySummaryInfo

TcxPivotGridField.SortOrder

TcxPivotGridGroupItem.Compare

TcxCustomPivotGrid Class

TcxCustomPivotGrid Members

cxCustomPivotGrid Unit