How can I get all the rows of ag-grid?
问题 ag-grid provides a way to get selected rows using api.getSelectedRows() function. And provides a way to set all rows using api.setRowData([]) function. I'm looking for something getAllRows() to return all the rows in the grid. I know there is a way to loop through all the rows using api.forEachNode() etc. Is there any way I can get the entire array of rows? 回答1: I don't think there is such a method but you can make your own: getAllRows() { let rowData = []; this.gridApi.forEachNode(node =>