Skip to main content

ASPxClientTreeList.SortBy(columnIndex) Method

Sorts data by the specified data column‘s values.

Declaration

SortBy(
    columnIndex: number | string | ASPxClientTreeListColumn,
    sortOrder?: string,
    reset?: boolean
): void

Parameters

Name Type Description
columnIndex string | number | ASPxClientTreeListColumn
sortOrder string

A string value that specifies the column’s sort order (‘ASC’, ‘DESC’ or ‘NONE’).

reset boolean

true to clear any previous sorting; otherwise, false.

Remarks

The ASPxTreeList allows data sorting by multiple columns. Any previous sorting is cleared if the reset parameter is set to true. The newly sorted column is appended to the collection of sorted columns. Its position within the collection can then be changed using the TreeListDataColumn.SortIndex property.

Sorting is allowed if the TreeListSettingsBehavior.AllowSort property is set to true. To learn more, see Sorting.

See Also