Returns or sets a value that determines whether ListItem objects in a ListView control are sorted in ascending or descending order.
object.SortOrder [= integer]
The parts of the SortOrder property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to a ListView control. |
integer | An integer specifying the type of sort order, as described in Settings. |
The SortOrder property settings are described in the following table.
Value | Description |
---|---|
0 | (Default) Ascending order. Sorts from the beginning of the alphabet (A-Z) or the earliest date. Numbers are sorted as strings, with the first digit determining the initial position in the sort, and subsequent digits determining sub-sorting.. |
1 | Descending order. Sorts from the end of the alphabet (Z-A) or the latest date. Numbers are sorted as strings, with the first digit determining the initial position in the sort, and subsequent digits determining sub-sorting. |
The Sorted property must be set to True before a list will be sorted in the order specified by SortOrder.