我想为 igx-grid 启用批量编辑,以允许将已编辑的行提交到数据库。但我得到了错误: error-batch
我已经在app.modules.ts中导入了 IgxGridModule。为什么我会收到此错误?
这是我的网格。
<igx-grid #grid1
[batchEditing]="true"
[data]="posts"
width="80%"
height="600px"
style="margin: auto"
[showToolbar]="true"
toolbarTitle="Cars"
[allowFiltering]="true"
[columnHiding]="true"
[hiddenColumnsText]="'hidden'"
[columnPinning]="true"
[pinnedColumnsText]="'pinned'"
[primaryKey]="'examplelotId'"
[rowEditable]="true">
<igx-grid-toolbar>
<igx-grid-toolbar-title>Example Table</igx-grid-toolbar-title>
</igx-grid-toolbar>
<igx-column field="examplelotId" dataType="number" header="LotId" [sortable]="true" [movable]="true"></igx-column>
<igx-column field="exampleproduction" header="Production" [sortable]="true" [movable]="true" [dataType]="'string'"></igx-column>
<igx-column field="exampledepartment" header="Department" dataType="string" [sortable]="true" [movable]="true">
</igx-column>
<igx-column width="100px" [filterable]="false">
<ng-template igxCell let-cell="cell">
<button igxButton="icon" (click)="removeRow($event, cell.cellID)">
<igx-icon>delete</igx-icon>
</button>
</ng-template>
</igx-column>
</igx-grid>
PS我使用Angular 12。