omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
251 stars 113 forks source link

How to change background-color of TR ? #291

Closed jarodxxx closed 1 year ago

jarodxxx commented 1 year ago

Hi, First i want to thank's you for the work it's very usefull !

There is a way to change the background-color of an TR based on a condition ? Or maybe a way to put a template for an entier row ?

Thank's you

curry684 commented 1 year ago

As the actual rendering is done by the clientside DataTables library we have no facilities for this. You can hook into the clientside events needed for this by taking the Promise returned from initDataTables and take it from there: https://datatables.net/forums/discussion/57940/sorting-breaks-rowrender#latest