← DataGrid API

Class · v2.6.0

NgbDatagridDefaultEditService

Default immutable edit service that tracks original rows and removes unsaved new rows on cancel.

Import

import { NgbDatagridDefaultEditService } from '@angular-bootstrap/ngbootstrap';

Declaration

Methods

create

create(data: readonly T[], newRow: T, _rowIndex: number, rowId: NgbDatagridRowId): T[]

update

update(data: readonly T[], updatedRow: T, rowIndex: number, rowId: NgbDatagridRowId): T[]

remove

remove(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[]

assignValues

assignValues(row: T, values: Partial<T>): T

isNew

isNew(rowId: NgbDatagridRowId): boolean

hasChanges

hasChanges(rowId: NgbDatagridRowId, currentRow: T): boolean

saveChanges

saveChanges(data: readonly T[], _rowIndex: number, rowId: NgbDatagridRowId, _currentRow: T): T[]

cancelChanges

cancelChanges(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[]

Referenced types

Source: src/datagrid/src/services/editing.service.ts in the installed @angular-bootstrap/ngbootstrap package. Angular compiler metadata and private members are omitted.

This project is not affiliated with ng-bootstrap or ngx-bootstrap. Those projects focus mainly on Bootstrap components for Angular. ngbootstrap focuses on Angular UI for data-heavy apps, especially Data Grid, Angular-native Form Builder, drag and drop workflows, documentation examples, and performance-focused Angular patterns.