Search code examples
angularag-gridmaster-detailbug-reporting

Ag-grid update data fails when master/detail is active and at least one row expanded to it's details


I'm using Ag-grid angular enterprise edition in my project. I set the grid data by clicking on a submit form button using grid's API as follow:

api.setRowData(newData);

the update data will be done without any problem if masterDetail is inactive. in gridOption

masterDetail: false,

If i try to use masterDetail option, update form works until one row expanded to it's details. after that submit button won't change the grid data rows in the screen anymore. however when i get the grid data by grid's API like this:

let rowData = [];
api.forEachNode(node => rowData.push(node.data));
console.log(rowData)

the rowData is the correct data in the console, but in action I can't see the correct data in the grid.


Solution

  • I hopefully found the problem. my mistake was that the Id I set for rowNode wasn't unique. after fixing that the problem solved.