_Table.Sort(String, Object) Method

Definition

Sorts the rows of the Table by the property specified in SortProperty and resets the current row to just before the first row in the Table.

public void Sort (string SortProperty, object Descending);
Public Sub Sort (SortProperty As String, Optional Descending As Object)

Parameters

SortProperty
String

Specifies the property to use to sort the rows of the Table.

Descending
Object

Whether to sort the Table in descending order.

Remarks

SortProperty can be any explicit built-in property or custom property, with the exception of binary and multi-valued properties. The property must be referenced by its explicit string name; it cannot be referenced by namespace. For further information on specifying sort properties, see Sorting Items in a Folder

Sorting the table is equivalent to calling a MoveToStart() method. The cursor will be positioned to the start of the Table.

If Table.Sort and then Restrict(String) are called, the filtered items in the new Table will be sorted by the same SortProperty and SortOrder.

Table.Sort only supports sorting on a single column.

Applies to