... <td> My Content </td>
If the function return the string style='color:red' class='myclass', then the contents in the dom for that column will be
... <td style='color:red' class='myclass'> My Content </td>
As can be seen we can set any valid attribute for the cell including colspan and rowspan
In PHP this will look like this:
<?php ... $mycellattr = <<< CELLATTR function (rowid, value, rawObject, colModel, arraydata) { return "style='color:red' class='myclass' "; } CELLATTR; $grid ->setColProperty('field', array("cellattr"=>"js:".$mycellattr)); ... ?>
Parameters passed to this function are