setSortColumns

Sets the columns by which the table will be sorted. The table is sorted by the first column in the list, all rows that have an equal value in the first column are sorted by the second column etc.

Synopsis

void setSortColumns(const dyn_dyn_anytype &sortDefinitions) synchronized(_unfilteredData)

Parameters

Parameter Meaning
sortDefinitions List of columns to sort by. Each entry is a dyn_anytype containing the name of the column as the first element and (optionally) the sort direction (`true` for ascending)
// sort by two colums (time (newest first), then value (ascending)
view.setSortColumns(makeDynAnytype(makeDynAnytype("time", false),
                    makeDynAnytype("value")));

Assignment

DynamicTableView

Availability

CTRL