Set_row_color being overwritten by style

function formatting($row) {
	if ($row->get_value("last_cn")!='') $row->set_row_color("red");
}

On my dhx_skyblue skinned grid, the above function correctly sets the row color red for the white rows, but is being overwritten somewhere along the line for the sky blue rows.

Any way to avoid that?

Found the answer.

$row->set_row_style("background-color:red;");

Greg

Although the above does not apply it to the tr, like I would expect, but to each td in the row. For a bigger style setting like border, color, font, etc. and a large number of rows, thousands, that gets to be a lot of html written to the page.

Is there a a way for me to streamline it? I tried $row->set_row_attribute("class","backrgroundclass");
but that was superceded by the .odd_dhx_skyblue background coloring class.

Thanks.
Greg

You can use
$row->set_row_attribute(“class”,“backrgroundclass”);
and in the css, add the !important flag.

.backrgroundclass{
background:red !important;
}

also, it is important to use background, not background-color, to override image backgrounds as well.

Wonderful, thank you!