How can I get all the rows of ag-grid?

前端 未结 4 1397
名媛妹妹
名媛妹妹 2021-02-19 09:57

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.

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-19 10:45

    This is how I get the rowData from the grid API:

    api.getModel().gridOptionsWrapper.gridOptions.rowData
    

    Lots of methods include gridOptionsWrapper in their return object, so you don't necessarily have to use getModel().

提交回复
热议问题