UNPKG

@progress/kendo-angular-grid

Version:

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

47 lines (46 loc) 2.29 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * Represents the predicate that is used by the * [DetailTemplateDirective]({% slug api_grid_detailtemplatedirective %}) conditional rendering * ([see runnable example]({% slug detailrowtemplate_grid %}#toc-conditional-display)). * * ```ts-no-run * myCondition(dataItem: any, index: number) { return dataItem.CategoryID % 2 === 0; } * ``` */ export type DetailTemplateShowIfFn = (dataItem: any, index: number) => boolean; /** * Represents the detail template of the Grid ([more information and examples]({% slug detailrowtemplate_grid %})). * To define the detail template, nest an `<ng-template>` tag with the `kendoGridDetailTemplate` directive inside a `<kendo-grid>` tag. * * @example * ```html * <kendo-grid [data]="data" selectable="true" style="height: 160px"> * <kendo-grid-column field="ProductName"></kendo-grid-column> * <ng-template kendoGridDetailTemplate let-dataItem> * <div *ngIf="dataItem.Category"> * <header>{{dataItem.Category?.CategoryName}}</header> * span>{{dataItem.Category?.Description}}</span> * </div> * </ng-template> * </kendo-grid> * ``` * */ export declare class DetailTemplateDirective { templateRef: TemplateRef<any>; /** * Defines the function that indicates if a given detail row and the associated **Expand** or **Collapse** button will be displayed. */ set showIf(fn: DetailTemplateShowIfFn); get showIf(): DetailTemplateShowIfFn; constructor(templateRef: TemplateRef<any>); private _condition; static ɵfac: i0.ɵɵFactoryDeclaration<DetailTemplateDirective, [{ optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<DetailTemplateDirective, "[kendoGridDetailTemplate]", never, { "showIf": { "alias": "kendoGridDetailTemplateShowIf"; "required": false; }; }, {}, never, never, true, never>; }