Back to Devexpress

TdxCustomTreeView.CustomSort(TdxTreeViewNodeCompareProc,NativeInt,Boolean) Method

vcl-dxtreeview-dot-tdxcustomtreeview-dot-customsort-x28-dxtreeview-dot-tdxtreeviewnodecompareproc-system-dot-nativeint-system-dot-boolean-x29.md

latest1.9 KB
Original Source

TdxCustomTreeView.CustomSort(TdxTreeViewNodeCompareProc,NativeInt,Boolean) Method

Sorts tree nodes.

Declaration

delphi
function CustomSort(ASortProc: TdxTreeViewNodeCompareProc; AData: NativeInt; ARecurse: Boolean = True): Boolean;

Parameters

NameTypeDescription
ASortProcTdxTreeViewNodeCompareProc

A custom comparison routine.

| | AData | NativeInt |

Specifies a pointer to additional data for the custom comparison routine. This parameter is intended to be backward compatible with the TTreeView control.

| | ARecurse | Boolean |

If True , the function sorts nodes at all nesting levels in the Tree View. If False , the function sorts only root level nodes.

|

Returns

TypeDescription
Boolean

True if the sort operation is successful; otherwise, False.

|

Remarks

You can handle the Tree View’s OnCompare event to implement a custom node sorting algorithm.

Note

If you need to sort nodes in an individual branch, call the AlphaSort or CustomSort method of the branch’s root node.

See Also

TdxCustomTreeView Class

TdxCustomTreeView Members

dxTreeView Unit