TdxCustomListView.OnCompare Event
Allows you to implement a custom item sort.
Declaration
property OnCompare: TdxListViewCompareEvent read; write;
Remarks
This event occurs every time two items are about to be compared during a sort operation.
The AItem1 and AItem2 parameters identify the items to be compared. Use their properties to determine their order in the sorted list. The table below explains which values you should assign to the ACompare parameter to achieve a specific item order:
Value | Description |
---|---|
A negative integer value | AItem1 is positioned before AItem2 . |
0 | AItem1 is positioned before AItem2 . |
A positive integer value | AItem is positioned after AItem2 . |
Refer to the TdxListViewCompareEvent type description for an OnCompare event handler example and information on available options.
See Also