I have implemented a grid that contains rows with checkbox for first column except the last row(i.e, doesn't have any checkbox for last row).
const colDef = {
headerCheckboxSelection: this.forCheckbox,
checkboxSelection: this.forCheckbox
}
forCheckbox(params) {
const displayedColumns = params.columnApi.getAllDisplayedColumns();
if (params.node) {
return (displayedColumns[0] === params.column &&(params.node.data.myColNameValue !== '');
}
return (displayedColumns[0] === params.column);
}
so myColNameValue is '' only for the last row. And because of this condition last row of the grid will not have checkbox. But when I am clicking on the header checkbox it is checking and selecting all the rows along with the last row as well even though it doesn't has a checkbox.