SortOrder

This property returns and sets a value that determines whether ListItem objects in a ListView control are sorted in ascending or descending order.

Syntax

object.SortOrder [= integer]

Parameters

object
Object expression that evaluates to a ListView control.
integer
Integer that specifies the type of sort order, as described in Settings.

Following are the settings for the SortOrder property:

0 (default)
Ascending order. Sorts from the beginning of the alphabet (from A through 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 (from Z through 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.

Remarks

You must set the Sorted property to True before a list sorts in the order specified by SortOrder.