Box
Map
Row
A newer version of this page is available. Switch to the current version.

JavaScript/jQuery TreeList - sorting

Configures runtime sorting.

Type:

Object

A user can sort rows by values of a single or multiple columns depending on the value of the sorting.mode property.

DevExtreme HTML5 JavaScript jQuery Angular Knockout UI component TreeList Sorting

To apply sorting to a column, a user clicks its header or selects a command from the context menu.

DevExtreme HTML5 JavaScript jQuery Angular Knockout UI component TreeList Sorting

Note that rows are sorted within their hierarchical level.

View Demo

See Also

ascendingText

Specifies text for the context menu item that sets an ascending sort order in a column.

Type:

String

Default Value: 'Sort Ascending'

clearText

Specifies text for the context menu item that clears sorting settings for a column.

Type:

String

Default Value: 'Clear Sorting'

descendingText

Specifies text for the context menu item that sets a descending sort order in a column.

Type:

String

Default Value: 'Sort Descending'

mode

Specifies the sorting mode.

Type:

String

Default Value: 'single'
Accepted Values: 'multiple' | 'none' | 'single'

The following selection modes are available in the UI component:

  • Single
    Rows can be sorted by values of a single column only.

  • Multiple
    Rows can be sorted by values of several columns.

View Demo

showSortIndexes

Specifies whether to display sort indexes in column headers. Applies only when sorting.mode is "multiple" and data is sorted by two or more columns.

Type:

Boolean

Default Value: true