Answers for "ag grid add new row"

0

How to add new row to a particular index of a ag grid using angular 7

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
}
Posted by: Guest on May-26-2020
0

ag-grid add row

const selectedRow = this.gridApi.getFocusedCell()
const id = this.gridOptions.rowData[selectedRow.rowIndex].i

this.gridOptions.rowData.splice(selectedRow.rowIndex, 1)
this.gridApi.setRowData(this.gridOptions.rowData)
Posted by: Guest on January-17-2022

Code answers related to "TypeScript"

Browse Popular Code Answers by Language