How to get the data of selected row in ag grid in angular2?

后端 未结 6 1908
温柔的废话
温柔的废话 2021-02-14 05:09

I have setup ag-grid in angular2 which works fine but i am not able to get the value of selected row...There are no errors in my console window...This is how i am initialising t

6条回答
  •  孤城傲影
    2021-02-14 05:51

    you can use api.getSelectedRows() that Returns a array of selected rows data.

     public getSelectedRows(){
            let rowsSelection = this.gridOptions.api.getSelectedRows();
            console.info(rowsSelection);
          }
    

    that's work for me.

提交回复
热议问题