New to KendoReact? Start a free 30-day trial
Sorting
SortingPremium
The KendoReact TreeList enables you to sort single and multiple data-bound columns.
Getting Started
To enable sorting:
- Set the
sortableoption of the TreeList. - Set the
fieldoption of the TreeList column. - Utilize the
sortoption to apply the sorting styles and buttons to the affected columns. - When
sortableis configured and the user tries to sort a column, theonSortChangeevent is emitted. Handle theonSortChangeevent where you have the option to sort the data programmatically, to make a request to the server for server sorting, or to use theorderByfunction which automatically processes the data.
The following example demonstrates the minimum required configuration for sorting the TreeList records.
Change Theme
Theme
Loading ...
Customizing the Sorting
The sorting feature of the TreeList enables you to unsort the columns and sort the records by multiple columns.
- To enable the unsorting of columns, utilize the
sortable.allowUnsortoption which determines if the columns can be unsorted. - To enable the sorting of multiple columns, set the
sortable.modeoption which accepts asingleormultiplevalue.
Change Theme
Theme
Loading ...