⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

The color change in the column



liludallas
  • profile picture
  • Member

Posted 07 October 2012 - 20:46 PM

Hello!
I would like to change the color display in one of the columns.
...
$crud->callback_column('Price',array($this,'color'));
...

function color($value, $row)
{
return $row->Price.'<style="color:green"/>';
}
but this does not work..
Do I need to change something in the file datanbles.css?
Is incorrectly formulated the code?



liludallas

victor
  • profile picture
  • Member

Posted 08 October 2012 - 06:49 AM

function color($value, $row)
{
return '<span style="color:red">demo text<span>'
}
?>

liludallas
  • profile picture
  • Member

Posted 08 October 2012 - 11:07 AM

yes...

return '<span style="color:green"><span>'.$row->Cena;

Of course, thank you Victor

Jacek