New to Kendo UI for Vue? Start a free 30-day trial
Native TreeList Sorting
The Kendo UI for Vue Native TreeList enables you to sort its data by a single or multiple 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 default sorting functionality of the TreeList allows you to upgrade it with the following features:
- Unsort the columns - To enable the unsorting of columns, set the
sortable.allowUnsortproperty totrue. With this configuration, when you click on a column header multiple times, one of the columns states will be an "unsorted" column. - Sort the records by multiple columns - To enable the multiple columns sorting, set the
sortable.modeoption tomultiple(the property accepts asingleormultiplevalue) .
Change Theme
Theme
Loading ...