UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

62 lines (61 loc) 1.9 kB
/**----------------------------------------------------------------------------------------- * 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 that are used by the * [rowClass]({% slug api_grid_gridcomponent %}#toc-rowClass) property. */ export interface RowClassArgs extends RowArgs { } /** * Represents the callback that is used by the * [rowClass]({% slug api_grid_gridcomponent %}#toc-rowclass) property. * * ```ts * 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 that is used by the * [rowSelected]({% slug api_grid_gridcomponent %}#toc-rowselected) property. * * ```ts * rowCallback({ dataItem, index }) { * return index % 2 === 0; * } * ``` */ export type RowSelectedFn = (context: RowArgs) => boolean; /** * Represents the callback that is used to determine whether a given data row will be selectable. Used by the * [isRowSelectable]({% slug api_grid_gridcomponent %}#toc-isrowselectable) property. * * ```ts * isRowSelectableCallback({ dataItem, index }) { * return index % 2 === 0; * } * ``` */ export type RowSelectableFn = (context: RowArgs) => boolean; /** * Represents the callback that is used to determine whether a given data row will be sticky. * * ```ts * rowStickyCallback({ dataItem, index }) { * return index % 2 === 0; * } * ``` */ export type RowStickyFn = (context: RowArgs) => boolean;