Skip to main content

TcxCustomListView.CustomSort(TLVCompare,Longint) Method

Sorts items using the specified item comparing routine.

Declaration

function CustomSort(SortProc: TLVCompare; lParam: Longint): Boolean;

Parameters

Name Type
SortProc TLVCompare
lParam Longint

Returns

Type
Boolean

Remarks

The CustomSort method is used to perform item sorting using the comparison routine specified by the SortProc parameter. If nil is passed as the SortProc parameter, the method behaves as the AlphaSort method. Please refer to the TCustomListView.CustomSort method description for details on using the CustomSort method.

It is not recommended to use the CustomSort method. Instead, call the AlphaSort method and handle the OnCompare event to specify the items comparing logic. If the OnCompare event is not handled, the AlphaSort method compares items by their captions (the Caption property of TListItem objects representing items).

See Also