sebastienheyd / boilerplate

Laravel AdminLTE 3 Boilerplate package with blade components, users, roles and permissions management
MIT License
217 stars 65 forks source link

Datatable row color #91

Closed nicopoal closed 1 year ago

nicopoal commented 1 year ago

Hi, By default, datatable puts the "even" and "odd" classes on the rows. I'd like to be able to customize the color (or classnames) of each row according to the values of a column in the row (for example, for a status, green for finished, red for late). Is this possible? Thanks for your help

sebastienheyd commented 1 year ago

Hi,

Yes, this is possible by using the setRowClass method : https://sebastienheyd.github.io/boilerplate/datatables/options#setrowclass