class MyGridEventHandler extends GridEventHandler
{
function OnRowPreRender($row,$args)
{
$row->DataItem['sVol_16format'] = number_format($row->DataItem['sVol_16'], 0,'.', ',');
}
}
$grid->EventHandler = new MyGridEventHandler();
$group = new GridGroup();
$group->Expand = true; //Collapse
$group->GroupField = "molecule";
$group->HeaderText = "";
$group->AddInfoField("sVol_16format","sum");
$group->InfoTemplate = "Total 2016: {sVol_16format} $";
// $group->ThousandSeperate = "."; // Display 1'000.53 instead of 1,000.53
// $group->DecimalNumber = 0;
$grid->MasterTable->AddGroup($group);
Warning: Invalid argument supplied for foreach()
, and if I take "sum" aggregator out from [$group->AddInfoField("sVol_16format","sum");] I get this:
it's the value of first row, not the sum of the groupfield [molecule].
I think that after number_format is applied on [sVol16_format] value, [string $aggregate] value produces this error:
Warning: Invalid argument supplied for foreach()