Applies to
ListView, TreeView controls
Description
The SortType property specifies how items should be sorted. Items can be sorted alphabetically based on the item names or according to user-defined rules. If you specify a user-defined or unsorted sort type, define your sort criteria in the Sort event of the control.
In TreeView controls, each parent item's children form their own sorted list. For more information, see the section called “Sorting items” in Application Techniques.
Usage
In a painter
To specify how items should be sorted:
-
Select the desired sort type from the Sort drop-down list on the General page of the control's Properties view.
In scripts
The SortType property takes a value of the grSortType enumerated datatype. The following line specifies Unsorted for the items in a ListView.
lv_1.SortType = Unsorted!