Is it possible to color an entire row if that row has column is_active true or false?
Even if my reply is very late but I decided to post it as it may help other people:
so Yes it is possible and this is how:
1- Override the column which contains the value on which the color should depend (in my case I use status)
$crud->callback_column('status', array($this, '_callback_status'));
2- in the callback function :
public function _callback_status($value, $row) {
return "<div class='".($value=='success'?'success':'error')."'>$value</div>";
}
so that we have the div class which differs depending on the value of the column and basically we have one class for each color variation.
3- we return back to the method where we have the render function and we add this line just after the render execution:
$output = $crud->render();
$output->output .= "<script>
$('.error').closest('tr').css('background-color','#FFC3C0');
$('.success').closest('tr').css('background-color','#CCFFCC');
</script>";
and that is all
Best wishes from Tunisia...