I have a simple ag-grid in an Angular project and want to disable selection of cells in one of its columns. Simply removing the default blue outline during selection would also be fine. I just want no visual change to the cell when the user clicks inside it. How can I do this?
I see that ColDef
has a property suppressNavigable
that sort of helps, since it disallows using the tab key to select the cells, but it still allows selection by clicking. Also, the grid itself seems to offer suppressCellSelection
but it doesn't seem granular enough and doesn't seem to affect anything anyway.
So, how can I remove this blue border cell selection?
Here's the code I have for these column definitions:
this.columnDefs = [
{ headerName: 'One', field: 'one' },
{ headerName: 'Two', field: 'two' },
{
// I want to disable selection of cells in this column
headerName: 'I want no cell selection!',
field: 'three',
suppressNavigable: true,
editable: false,
}
];
Here's an example stackblitz I was using to test with: https://stackblitz.com/edit/aggrid-want-to-disable-cell-selection
Here's a screenshot of the blue border I don't want to see in this column: