I am using AgGrid and have rowSelection="multiple"
on my grid, have {cellRendererFramework: PrintCell}
on the last column, which is a small component that displays a link.
I want it so, when I click on the link inside PrintCell
, a certain action should be executed, without altering the the state of the grid itself, and keep the current selected lines selected without making the row containing the link selected. I tried doing event.stopPropagation
and event.preventDefault
to prevent the parent row from getting selected, to no avail.
Any Idea how to achieve this ? thanks
Updated for June 2018:
The API for Ag-Grid has changed. The key change is that there needs to be a change to
e.api.gridOptionsWrapper.gridOptions.suppressRowClickSelection
from within theonCellFocused
event of the gridHere is a full solution that uses a reusable cell renderer to create actions or buttons at the end of a row that won't trigger row selection. This solution assumes that you are using the React version of ag-grid and that you are using a custom cell renderer.