@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
84 lines (83 loc) • 2.9 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
/**
* Defines the settings for sorting the Grid column.
*/
export interface ColumnSortSettings {
/**
* Enables the removal of the column sorting.
*/
allowUnsort?: boolean;
/**
* Determines the initial (from the unsorted to the sorted state) sort direction.
*
* The available values for setting the initial sort direction.
*/
initialDirection?: 'asc' | 'desc';
}
/**
* Specifies settings for sorting by single column.
*/
export interface SingleSortSettings extends ColumnSortSettings {
/**
* The sort mode of the Grid.
*/
mode?: 'single';
}
/**
* Specifies a modifier key when multiple sort. [See example](slug:multi_sort_grid#toc-sort-key-modifier).
*
* @example
* ```html
* <kendo-grid [sortable]="{ mode: 'multiple', multiSortKey: 'shift' }">
* <kendo-grid-column field="ProductID"></kendo-grid-column>
* ...
* </kendo-grid>
* ```
*/
export type ModifierKey = 'none' | 'ctrl' | 'shift' | 'alt';
/**
* Specifies settings for sorting by multiple columns. [See example](slug:multi_sort_grid).
*/
export interface MultipleSortSettings extends ColumnSortSettings {
/**
* The sort mode of the Grid.
*/
mode?: 'multiple';
/**
* Enables the sort-sequence indicators for sorting multiple columns.
*/
showIndexes?: boolean;
/**
* Specifies the modifier key for sorting by 2nd or more columns.
*
* By default, clicking a column adds it to the sort order (corresponds to `'none'`).
* Selecting a key modifier along with the click will remove sorting from all other columns.
*
* If the key is set to 'ctrl', 'shift' or 'alt', clicking a column will remove sorting from all other columns.
* The specified key must be pressed to add the column to the sort order instead.
* The `ctrl` value corresponds to the `Command` key in a macOS environment. [See example](slug:multi_sort_grid#toc-sort-key-modifier).
*
*/
multiSortKey?: ModifierKey;
}
/**
* Defines the settings for sorting the Grid. [See example](slug:multi_sort_grid).
*
* The available options are:
* * `boolean`
* * [SingleSortSettings]({% slug api_grid_singlesortsettings %})
* * [MultipleSortSettings]({% slug api_grid_multiplesortsettings %})
*
* @example
* ```html
* <kendo-grid [sorting]="true"></kendo-grid>
* ```
*/
export type SortSettings = boolean | SingleSortSettings | MultipleSortSettings;
/**
* @hidden
*/
export declare const normalize: (...settings: (SortSettings | ColumnSortSettings)[]) => any;