grido
grido copied to clipboard
Add a columns SUM feature
It would be great to add a columns SUM feature. It can be attached to the grid in the same way as filters are.
Just the last row of the grid would contain sums of the (numerical) columns, specified by user by ->addSum()
From my point of view the funcionality should be sum of the visible rows (when paginator is enabled) or all rows without paginator.
@miler87 have you implemented it yet?
@o5 have you thought of that feature yet? can you point me where I could start off implementing it?
nevermind, I implemented it by extending Columns\Number & adding property $calculateSum
& checking for it trueness in Grid.latte template
@Ciki cool idea but does it work with pagination? We're facing the same problem right now but in our case we're expecting quite large datasets so we need pagination and (efficiently) calculated sums at the same time.
yes, the calculation is actually made in .latte as well if that flag is set. so whatever is rendered it calculated sum