I've successfully integrated Angular Ag-Grid to display a list of data. Is there a way to selectively hide certain row values (cells)?
https://i.sstatic.net/yw4zN.png
Specifically, I'd like to hide the edit and delete icons on the last row of the grid. The current code I'm using achieves this goal, but it may not be the most efficient or Angular-friendly approach:
setTimeout(()=>{
hideLastColCells()
},200);
hideLastColCells() {
let tableRow = document.getElementsByClassName('ag-center-cols-container')[0].children;
let lastRow = tableRow[tableRow.length - 1].children
lastRow[lastRow.length-1].classList.add("d-none");
lastRow[lastRow.length-2].classList.add("d-none");
}
The use of setTimeout impacts user experience negatively and is not in line with Angular best practices.