datagrid icon indicating copy to clipboard operation
datagrid copied to clipboard

Use aggregator function with Doctrine Data Source

Open FilipLukac opened this issue 8 years ago • 1 comments
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 avatar Sep 15 '17 10:09 FilipLukac

@FilipLukac Actually the aggregation functions is the only undocumented feature of this datagrid. :/

But the FunctionSum should work properly.

paveljanda avatar Oct 05 '18 16:10 paveljanda