SSpread.SortKey Property
Set the row number or column number to be used as the sort key.
This property is an Index Property. For the index, specify the priority of the sort key (from 0 to 255, the smaller the higher priority).
Use this property and the SortKeyOrder property to prepare the information needed for sorting. By making the index (priority) of the SortKey property and SortKeyOrder property the same, you can set the combination of the row / column number used as the sort key and the sort order (ascending / descending order).
The actual sorting is done by calling the Sort method.
Example of usage
SortKey (0) = 2; / * 1st key 2nd column * /
SortKey (1) = 3; / * 2nd key 3rd column * /
SortKey (2) = 4; / * 3rd key 4th column * /
SortKeyOrder (0) = $ SortKeyOrderAscending; / * 1st key ascending order * /
SortKeyOrder (1) = $ SortKeyOrderDescending; / * 2nd key descending order * /
SortKeyOrder (2) = $ SortKeyOrderDescending; / * 3rd key descending order * /
Sort (1, -1, 4, -1, $ SortByRow); / * Sort all rows in columns 1 to 4 * /
Related Items
SortKeyOrder property
Sort method