Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Data Grid › is there a way to add a class to a cell? This topic has 1 reply, 2 voices, and was last updated 2 years ago by ivanpeevski. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts October 12, 2023 at 2:53 pm #108963 edwardsmarkffParticipant hello – i see setCellValue and setCellStyle – is there an addCellClass or something similar? Using something like element.classList.add() does not appear to work as the class name is removed when the grid renders. also, i REALLY REALLY love using smart html elements grid! 😍 This topic was modified 2 years ago by edwardsmarkff. October 12, 2023 at 4:39 pm #108965 ivanpeevskiParticipant 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/ Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In With Google Log In