Just want to know whether we can distinguish between all row selection and individual row selection in ag-grid(via header checkbox selection). Is there a method or property associated with ag-grid to tell this difference?
Yes you can. The ag-grid api
offers some useful methods:
this.api.getSelectedRows()
will get you all the selected rows.
this.api.getDisplayedRowCount()
will get you all the rows displayed.
If these 2 equal each other, then the user has selected all the rows.
Ps. the api
is a of type GridApi
, which is initialised from the gridReady
event exposed by ag-grid
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments