@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
61 lines (60 loc) • 1.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
*-------------------------------------------------------------------------------------------*/
import { RowArgs } from './row-args';
/**
* Represents the callback arguments used by the [`rowClass`]({% slug api_grid_gridcomponent %}#toc-rowClass) property.
*/
export interface RowClassArgs extends RowArgs {
}
/**
* Represents the callback used by the [`rowClass`]({% slug api_grid_gridcomponent %}#toc-rowclass) property.
*
* @example
* ```typescript
* rowCallback({ dataItem, index }) {
* const isEven = index % 2 === 0;
* return {
* even: isEven,
* odd: !isEven
* };
* }
* ```
*/
export type RowClassFn = (context: RowClassArgs) => string | string[] | Set<string> | {
[key: string]: any;
};
/**
* Represents the callback used by the [`rowSelected`]({% slug api_grid_gridcomponent %}#toc-rowselected) property.
*
* @example
* ```typescript
* rowCallback({ dataItem, index }) {
* return index % 2 === 0;
* }
* ```
*/
export type RowSelectedFn = (context: RowArgs) => boolean;
/**
* Represents the callback used to determine whether a data row is selectable. Used by the [`isRowSelectable`]({% slug api_grid_gridcomponent %}#toc-isrowselectable) property.
*
* @example
* ```typescript
* isRowSelectableCallback({ dataItem, index }) {
* return index % 2 === 0;
* }
* ```
*/
export type RowSelectableFn = (context: RowArgs) => boolean;
/**
* Represents the callback used to determine whether a data row is sticky.
*
* @example
* ```typescript
* rowStickyCallback({ dataItem, index }) {
* return index % 2 === 0;
* }
* ```
*/
export type RowStickyFn = (context: RowArgs) => boolean;