Angular Grid Sorting Basics
The sorting functionality enables you to arrange the data by single or multiple fields in ascending or descending order.
DataBinding directive (
kendoGridBinding) performs the sorting operation automatically. To enable sorting when using a data-binding directive:
- Set the
sortableoption of the Grid.
- (Optional) Set the
sortproperty to a collection of
SortDescriptorobjects. This allows you to initially sort the data by the desired criteria.
<kendo-grid [kendoGridBinding]="gridData" [sortable]="true"> <kendo-grid-column field="ProductID"></kendo-grid-column> </kendo-grid>
The following example demonstrates the Grid sorting functionality when the
kendoGridBinding directive is applied.
Further details on how the data binding directive works under the hood are available in the data operations with the built-in directive documentation section.