Angular Grid Multi-Column Sorting
The Grid sorting feature enables you to sort the data by multiple column fields.
To sort by multiple fields, provide a MultipleSortSettings
object to the sortable
option and set the mode
property to multiple
.
export class AppComponent {
public sortSettings: MultipleSortSettings = {
mode: 'multiple'
};
}
The following example demonstrates sorting the data by multiple fields.
Sort Key Modifier
By default, clicking a column header cell triggers the multi-column sorting functionality by adding the respective field to the existing sorting criteria. To customize this behavior and enable only multi-column sorting when a pre-configured modifier key is pressed, use the multiSortKey
option.