Deselect selected rows from ag grid angular

Used grip api deselectAll function . It worked !

this.gridOptions.api.deselectAll();

For anyone that finds this in the future:

Allow manual row deselection by setting gridOptions.rowDeselection = true as Victor said.

Programatically deselect all rows using gridOptions.api.deselectAll() as OP discovered.

To programatically deselect a single row, use rowNode.setSelected(false). rowNode.setSelected(isSelected, clearSelection) can be used to select rows as well, and will deselect all rows other than the subject rowNode if clearSelection is true.


set gridOptions.rowDeselection to true with rowSelection as multiple will deselect a selected by click when holding control key.