sorting

Specifies options of runtime sorting.

Type:

Object

In dxDataGrid, a user can sort records by columns at runtime. To make a column available for sorting, set its allowSorting option to true. Sorting can be executed in various modes. To specify the required mode, use the mode property of the sorting configuration object.

See Also

For a structured overview of dxDataGrid sorting capabilities, see the Sorting article.

View Demo

ascendingText

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

Type:

String

Default Value: 'Sort Ascending'

In order to apply sorting to a column, a user calls a context menu by right-clicking the header of this column. Using this menu, the user can choose a sort order or reset sorting settings for this column. The text of the menu items can be customized using the ascendingText, descendingText and clearText options correspondingly.

clearText

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

Type:

String

Default Value: 'Clear Sorting'

In order to apply sorting to a column, a user calls a context menu by right-clicking the header of this column. Using this menu, the user can choose a sort order or reset sorting settings for this column. The text of the menu items can be customized using the ascendingText, descendingText and clearText options correspondingly.

descendingText

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

Type:

String

Default Value: 'Sort Descending'

In order to apply sorting to a column, a user calls a context menu by right-clicking the header of this column. Usingthis menu, the user can choose a sort order or reset sorting settings for this column. The text of the menu items can be customized using the ascendingText, descendingText and clearText options correspondingly.

mode

Specifies the runtime sorting mode.

Type:

String

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

Sorting in the dxDataGrid widget can be carried out in a single or multiple mode. For a comprehensive overview of these modes, refer to the Single Mode or Multiple Mode articles.

If you must disable sorting, assign "none" to the mode option.