UNPKG

@progress/kendo-angular-grid

Version:

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

54 lines (53 loc) 2.3 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ElementRef, Renderer2 as Renderer, NgZone, DoCheck } from '@angular/core'; import { Button } from '@progress/kendo-angular-buttons'; import { EditService } from './edit.service'; import { CellContext } from '../rendering/common/cell-context'; import { ContextService } from '../common/provider.service'; import * as i0 from "@angular/core"; /** * Represents the `save` command of the Grid. Apply this directive to any `button` * element inside a [CommandColumnComponent]({% slug api_grid_commandcolumncomponent %}) * ([see example](slug:editing_directives_grid#toc-command-column-directives)). * When you click the button with this directive, the * [`save`]({% slug api_grid_gridcomponent %}#toc-save) event fires. * The button with `kendoGridSaveCommand` is automatically hidden when the row is not in edit mode. * * You can change the button content based on the row state. * * @example * ```html * <kendo-grid> * <kendo-grid-command-column title="command"> * <ng-template kendoGridCellTemplate let-isNew="isNew"> * <button kendoGridSaveCommand>{{isNew ? 'Add' : 'Update'}}</button> * </ng-template> * </kendo-grid-command-column> * </kendo-grid> * ``` */ export declare class SaveCommandDirective extends Button implements DoCheck { private editService; private cellContext; rowIndex: number; protected isEdited: boolean; /** * @hidden */ get visible(): string; /** * @hidden */ commandClass: boolean; /** * @hidden */ onClick(e: any): void; constructor(editService: EditService, cellContext: CellContext, element: ElementRef, renderer: Renderer, ctx: ContextService, ngZone: NgZone); ngDoCheck(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SaveCommandDirective, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SaveCommandDirective, "[kendoGridSaveCommand]", never, {}, {}, never, ["*"], true, never>; }