sortType

Type: InternalPseudoArrayInteger

Availability: Read or write at run time only

The sortType property of the Table control specifies the type of data that the cell text represents. Use this property to control how to interpret the cell text when a table is sorted.

Each sheet of a Table control can have in the range zero through six sorted columns, and each of these columns has a corresponding sortType entry that defaults to normal alphanumeric sorting.

The values for the sortType property, represented by Table class constants, are listed in the following table.

Table Class Constant Cell Data Type Integer Value
SortType_Alpha Default alphanumeric sorting 0
SortType_Numeric Numeric sorting (including decimals and negative signs) 1
SortType_Date Date 2
SortType_Time Time 3
SortType_TimeStamp Timestamp 4

The numeric evaluation uses the locale of the user for the separator, decimal place, and negative sign character handling. In addition:

When the sortType property has a value of SortType_Time or SortType_TimeStamp, text in the cells is typecast as a String. Time values must be in 24‑hour format, or in 12‑hour format with an AM or PM suffix. Timestamp entries must be in a format that produces a correct typecast; for example, dd/MM/yyyy, hh:mm, where the time part can be in 24‑hour format, or in 12‑hour format with an AM or PM suffix.

If the text field of a cell is not a valid instance of the requested primitive type, the resulting sorting is undefined. The code fragment in the following example shows the use of the sortType property.

if index = 7 then
    table1.sortColumn[1] := 2;
    table1.sortType[1]   := table1.SortType_Numeric;
    table1.sortAsc[2]    := true;
    table1.sortCased[2]  := true;
elseif index = 8 then

You can also set the sort type by using the JadeTableColumn class sortType property.