Grid row coloring

I am trying to color the grid row if the progress is >99. I am using this function, and it only colors every other row. I need help trying to figure it out.


.color {background-color:#3ac944;}

gantt.templates.grid_row_class =
gantt.templates.grid_row_class = function (start, end, task) {
if (task.progress > 99) {
return “color”;

Hi @RonM,
The source of this error is that every odd task has a specific class “.odd”.
Use more specific rules in styles to get around it like this
.gantt_grid_data .color,
.gantt_grid_data .color.odd {
.gantt_grid_data .color:hover,
.gantt_grid_data .color.odd:hover {

Here is a sample, where you can see how it can be implemented :

1 Like

Thanks Guldmi,

That worked!