在 Kendo-Grid 中只有特定行是可编辑的

Only a specific row is editable in Kendo-Grid

我正在使用 angular 6,我有一个 Kendo UI 网格。

我有一个案例,如果用户选择(复制操作)一行,它会在网格中插入一个具有相同数据的新行。 我想要的是,让用户能够编辑 ONLY 新行。

所以一次只能编辑一行。我怎样才能做到这一点?

如果行索引不是复制的行索引,我建议使用单元格单击事件并关闭该行。

public editClick({ dataItem, rowIndex, columnIndex }: any): void {
        if(rowIndex != this.copiedRowIndex){
          this.closeEditor(this.grid,rowIndex)
        }
    }

private closeEditor(grid: GridComponent, rowIndex: number = this.editedRowIndex): void {
        grid.closeRow(rowIndex);
    }