📜  如何使用 Angular 7 将新行添加到 ag 网格的特定索引 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:22.427000             🧑  作者: Mango

代码示例1
addRow(){
  // Assuming newRow is an object, such as {"slNo": this.index,"id":3, "rank":1};
  rowData.splice(targetIndex, 0, newRow);
  this.gridApi.setRowData(rowData); // optional
}