ValueTable.Sort
Syntax:
Parameters:
<Columns> (required)
List of column names, separated by commas, by which the table will be sorted. Each column name may be followed by a space and a sort direction specification. Direction is defined as: "Desc": descending order; "Asc": ascending order. Sort ascending is used by default. The order of column names defines the sorting order. This means that the table initially will be sorted by the column indicated first. Then groups of rows with the same value in this column are sorted by the second column, etc.
<ObjectOfComparison> (optional)
Object for elements comparison. Independently of the object of comparison is specified or not, items with non-matching types are compared by type code, and simple type elements are compared by their values.
In addition:
- If object of comparison is not specified, then other item types are compared by string presentation;
- If object of comparison is specified, then:
- objects are compared by identifier ;
- points in time are compared by date and object identificator;
- elements of other types are compared by their string representation.
Description:
Availability:
Example:
PriceTable.Sort("Price Desc, Nomenclature Asc"); // Example using CompareValues object Alpha = New CompareValues; PriceTable.Sort("Price Desc", Alpha); |