Skip to content

How to Get All Rows in Ag-Grid

The easiest way to get the content of all rows’ data, back into a Javascript/Typescript array, is as follows.

Simply create a blank array, then loop through the rows of the grid and append each row to the array.

getAllRows() { let rowData = []; this.gridApi.forEachNode(node => rowData.push(node.data)); return rowData; }
Code language: TypeScript (typescript)

See also  Keep Google Map v3 centered when browser is resized
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
celal
celal
4 months ago

thanks

1
0
Would love your thoughts, please comment.x
()
x