Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
You do following this example:
DataTables::create(array(
...
"cssClass"=>array(
"td"=>function($row,$colName)
{
if ($colName=="officeCode")
{
return "text-center";
}
},
"th"=>function($colName)
{
if ($colName=="officeCode")
{
return "text-center";
}
},
)
));
Above example will make all "officeCode" column align to center.
Please let me know if you need further assistance.
Hi Jure,
I think your code lack one right parenthesis at the end of the if line so it's a PHP syntax error.
Please turn on error reporting for your PHP page so you know the line that cause error.
Please also use a coding editor (says Vistual Studio Code or Notepad++) which could show syntax error even before you run a page.
Thanks!
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo