React DataGrid - sorting

Configures runtime sorting.

Selector: Sorting
Type:

Sorting

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 DataGrid 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 DataGrid Sorting

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.

Default Value: 'single'

The following sorting 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.

  • None
    Sorting is disabled.

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