The Grid enables you to sort single and multiple data-bound columns.
To enable sorting:
- Set the
sortableoption of the Kendo UI Grid for Angular.
- To properly handle the sorting functionality, set the
fieldoption of the column. When
sortableis configured and the user tries to sort a column, the
sortChangeevent is emitted.
- Handle the
- Manually sort the data.
The Grid allows you to set the sorting direction to ascending or descending by configuring the
dir property of the
desc respectively. If
dir is not set, the descriptor will not be processed.
To set the initial sorting configuration, bind the
sort property of the Grid to a collection of sort descriptors. For more information on how to process data collections, refer to the article on the process helpers for bulk data operations.
The following example demonstrates how to set a sortable Grid with initially applied sorting configuration.