# Sorting

The Kendo UI for Angular PivotGrid component supports sorting through the [`PivotLocalBindingDirective`](https://www.telerik.com/kendo-angular-ui-develop/components/pivotgrid/api/pivotlocalbindingdirective) or the [`PivotOLAPBindingDirective`](https://www.telerik.com/kendo-angular-ui-develop/components/pivotgrid/api/pivotolapbindingdirective).

## Configuration

To define the initial sort state, set the [`sort`](https://www.telerik.com/kendo-angular-ui-develop/components/pivotgrid/api/pivotlocalbindingdirective#sort) property to a collection of [SortDescriptor](https://www.telerik.com/kendo-angular-ui-develop/components/data-query/api/sortdescriptor) objects containing the following keys:

* field—The name of the dimension, for example, `Region`.
* dir—The direction of the sorting.

> All inner members of the selected dimension will also be sorted.

The PivotGrid Configurator allows the end user to control the sort settings through the fields' chips menus.

The following example demonstrates basic configuration with initial sorting applied and enabled configurator:

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/pivotgrid/sorting/source.txt)

## Suggested Links

* [Angular PivotGrid Homepage](https://www.telerik.com/kendo-angular-ui/pivotgrid)
* [PivotGrid Filtering](https://www.telerik.com/kendo-angular-ui-develop/components/pivotgrid/filtering)
* [API Reference of the PivotGridComponent](https://www.telerik.com/kendo-angular-ui-develop/components/pivotgrid/api/pivotgridcomponent)
* [Data Binding Local Directive](https://www.telerik.com/kendo-angular-ui-develop/components/pivotgrid/data-binding/local-directive)
* [Data Binding OLAP Directive](https://www.telerik.com/kendo-angular-ui-develop/components/pivotgrid/data-binding/olap-directive)
