Declaration: ChartBook.Tables[].Sort(Col, ColSec: longint; Ascending: boolean);
The method Sort sorts the rows of the table according to the strings in column Col. In the case of equal elements in column Col the elements of column ColSec are used as a secondary sorting key. The parameter ColSec is stored in the property SecondarySortColumn. ColSec may be set to negative values in order to suppress secondary sorting.

The order of sorting is determined by the parameter Ascending. The sorting is performed by a modified bubble sort (CombSort), which has been reported to be comparable in speed to QuickSort (see also R.Box, S. Lacey, BYTE magazine, April 1991).

Note that sorting can also be achieved by clicking at the corresponding column header if the property SortEnabled is TRUE.