Skip to content

Sorting

The Sorting class is used to define column sorting in RecordsView control.

Constructor:

  • constructor(field: string | Field, sort?: SortingOrder)
    Creates a Sorting object instance. Field parameter can be a text or a field object like Contract.amount. Sort parameter can be either SortingOrder.Asc or SortingOrder.Desc. Default is SortingOrder.Asc.
Example 1
this.recordView.sorting = Contract.amount;  
Example 2
this.recordView.sorting = [  
    [Contract.amount],      // 1st tab sorting  
    [Customer.name]         // 2nd tab sorting  
];  
Example 3
this.recordView.sorting = [   
    Contract.amount,        // 1st level sorting  
    [Note.date]             // detail level sorting  
];