DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Tree List - Multiple Sorting

The TreeList component can sort values by a single or multiple columns. Use the sorting.mode property to specify the sort mode.

  • Single sort mode
    A user can click the column header to sort by this column and click it again to change the sort order. An arrow icon in the column's header indicates the sort order.

  • Multiple sort mode
    A user can hold the Shift key and click column headers in the order the user wants to apply sorting. A number in the column's header indicates the sort index. To cancel a column's sort settings, a user should hold the Ctrl key and click the column header.

This demo may be temporarily unavailable due to an issue with the UNPKG service we use for resource loading. You can vote on it in the

UNPKG repository

We're working on a fix — sorry for the inconvenience.

Backend API

A user can also apply or cancel sort settings in the column header's context menu. To disallow a user to sort by a particular column, set the column's allowSorting property to false.

To specify the initial sort settings, use the column's sortOrder and sortIndex properties.