Value sorting

24 May 20191 minute to read


This feature is applicable only for the relational data source.

The value sorting allows you to sort the columns and rows based on value fields.

The headers of the column to be sorted is given in the HeaderText property under the ‘ValueSortSettings’ in field wise order separated by a string. The string that is used to separate the headers is given in the HeaderDelimiters property.
Also you can sort column by clicking the column header. On clicking the same header once again will reverse the sorting direction.

  • JS
  • <ej:PivotGrid ID="PivotGrid1" runat="server" ClientIDMode="Static">
                <ej:Field FieldName="Country" FieldCaption="Country"></ej:Field>
                <ej:Field FieldName="Product" FieldCaption="Product"></ej:Field>
                <ej:Field FieldName="Amount" FieldCaption="Amount"></ej:Field>
                <ej:Field FieldName="Quantity" FieldCaption="Quantity"></ej:Field>
        <ValueSortSettings HeaderText="Bike##Quantity" HeaderDelimiters="##" SortOrder="Descending" />

    ASP NET pivot grid control before applying value sorting

    ASP NET pivt grid control after applying value sorting