Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Supposed you use the core Table widget, there's a "formatValue" property of columns that allows users to change a column value based on the current data row like this:
Table::create(array(
...
"columns"=>array(
"amount"=>array(
'formatValue'=>function($value, $row, $cKey)
{
//return a custom value based on the current $row and column name $cKey
return $customValue;
}
),
),
...
));
By core Table I meant \koolreport\widgets\koolphp\Table
:
https://www.koolreport.com/docs/koolphp/table/#table-settings-format-column-value
\koolreport\datagrid\DataTables
also has column formatValue option:
https://www.koolreport.com/docs/datagrid/datatables/#format-column-value
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo