ag-grid header checkbox selection event

Tejashri Patange

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?

ViqMontana

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.

edited at
0

Comments

0 comments
Login to comment

Related

ng-grid Event for Selection checkbox on header

group selection & checkbox in ag-Grid

disable checkbox selection in Ag-grid

Ag-Grid enable checkbox selection for a single rowNode

Retrieve row data on checkbox selection in Ag-grid

how to apply selectAll and deSelectAll to the header checkbox in ag-grid react

ag-grid row checkbox select. Making checkbox selection equivalent to row-selection

ag-grid: is there a way to trigger event when clear range selection

Multiple row selection on checkbox and single selection on clicking the row in ag-grid

AG-GRID-ANGULAR - How to check/uncheck checkbox in header component if all checkboxes in the cell renderers are checked/unchecked?

Only select rows from current page using checkbox on header in Ag-grid

Ag-grid sticky header

I want to make ag-grid cell editable on click event of checkbox

Clickable event on ag-grid

Angular ag-grid - how do I collect a header clicked event?

How to disable selection of cells in ag-grid?

How to get the selection order in ag-Grid?

Remove checkbox from rows in ag-grid

Ag Grid Call a function on click of checkbox

Programmatically check an ag-grid checkbox

ag-grid checkbox column checked by renderer

AG Grid: center checkbox alone in cell

assign a value to checkbox in a grid header

Dynamic header name refresh with Ag-Grid

Ag grid add second OR or AND to the filter in column header

AG-Grid dynamic column header text

ag-grid custom header with html

React - custom styling ag grid header

Listen to header changes in ag-grid