Row_odd css class overriding grid_row_class function

I am using angular and when I use the grid_row_class method of the gantt.template it works as long as the row is not an odd row. I would like to add a red background on any tasks with duration under 50 hours.

image

The picture above shows two tasks with the same duration and yet one is red and one isn’t. When I check the styling of the html element you can see my class is being overridden

image

image

Have to mark the custom class with !important for it to override the gantt odd class.

Hello,
It works that way if you return the class name and specify the style rule without the odd class name:

.red_color{
  background-color:crimson;
}

http://snippet.dhtmlx.com/5/b80ae60e1
To make it work correctly, you need to add the selector with the odd class name:

.red_color, .red_color.odd{
  background-color:crimson;
}

http://snippet.dhtmlx.com/5/ef462f940

We’ll add that information to the documentation.

Hello,
We’ve updated the documentation article:
https://docs.dhtmlx.com/gantt/api__gantt_grid_row_class_template.html