0

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?

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Just listen to selectionChanged event at grid level to apply some action per selection changed by column header checkbox

1 Comment

can you prevent selection for some rows?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.