JavaScript UI Libraries & Blazor Components Suite โ Smart UI โบ Forums โบ Data Grid โบ is there a way to add a class to a cell?Forum Login
hello โ i see setCellValue and setCellStyle โ is there an addCellClass or something similar?
setCellValue
setCellStyle
addCellClass
Using something like element.classList.add() does not appear to work as the class name is removed when the grid renders.
element.classList.add()
also, i REALLY REALLY love using smart html elements grid! ๐
Hi edward,
You can use column -> cellsClassName. You can set this to a function, which is called for each cell. For example:
cellsClassName: (index, dataField, value, rowData, row) => { if (index === 0) { return โcell-class-1โ }
Best Regards, Ivan Peevski
Smart UI Team https://www.htmlelements.com/