0

I have this model for ag-grid data;

data = {
   username: string,
   details: [
     {
      phoneNumber: string
     }
    ]
}

I want to delete a row on details table. I able to delete row/rows on master table(e.g. delete username) with using splice the data row id. But things get mixed up when the details table. I need a parent row number for the delete details table row. But I can't find any helpers on params.api. How to get parent row id or something like that?

Thanks for the help...

kinny94
  • 376
  • 1
  • 5
  • 22
  • 1
    your question is not clear my friend !! – SlimenTN Oct 02 '18 at 13:01
  • Ok. Do you know any way to get "parent row Id" with ag-grid api? – Hazalcan Elersu Oct 02 '18 at 13:13
  • you mean the parent id of the selected row or random row ? – SlimenTN Oct 02 '18 at 13:15
  • I mean selected row parent row id. – Hazalcan Elersu Oct 02 '18 at 13:24
  • in this case you can get the whole node that contains any information you want by doing `node = params.api.getSelectedNodes()[0];`, after that log the node in the console so you can see all the accessible attributes where you can get the row index, the parent, the rowData, etc... check this for more details https://www.ag-grid.com/javascript-grid-selection/ – SlimenTN Oct 02 '18 at 13:34

0 Answers0