datagrid
datagrid copied to clipboard
Use aggregator function with Doctrine Data Source
trafficstars
Hi,
I'm using Doctrine and Aggregation function like:
$grid->addColumnNumber('hoursDay', $this->translator->translate('templates.codes.calculatedValueDay'))
->setSortable()
->setFilterText();
$grid->addColumnNumber('hoursHalfDay', $this->translator->translate('templates.codes.calculatedValueHalfDay'))
->setSortable()
->setFilterText();
$grid->addAggregationFunction('hoursDay', new FunctionSum('hoursDay'));
$grid->addAggregationFunction('hoursHalfDay', new FunctionSum('hoursHalfDay'));
And results are 0 (when I tried to debug processDataSource wont process) Is there any documentation or / hint to use aggregator ?
@FilipLukac Actually the aggregation functions is the only undocumented feature of this datagrid. :/
But the FunctionSum should work properly.