The Grid enables you to sort single and multiple data-bound columns.
To enable sorting:
- Set the sortable option of the Kendo UI Grid for Angular.
- To properly handle the sorting functionality, set the field option of the column. When sortable is configured and the user tries to sort a column, the sortChange event 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 SortDescriptor to
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.