Hi
We are looking for the possibitity to add a total row (without grouping), like in this example: https://www.grapecity.com/wijmo/demos/Grid/Aggregation/Belowthedata/purejs
Is this possible to do, or can we raise this as a feature request?
It would be a great functionality.
Regards,
Bård
Hi,
Sorry, I forgot to include that part.Use:
gridObj .getColumns().forEach(function(column){
if(column.columnType == 'Number'){
column.provider.aggregate = 'Sum';}
});
In the IF condition you can use whatever you want. In this case, I'm showing the totals for all Number Columns but you can do it by binding for example- column.provider.binding == 'Customer.Age'.
Best Regards,Daniel Figueira
Thank you, work very good!
Could you share the sample oml file please?
While we don't have this option in the grid, you can achieve it by putting the following JS in the GridOnInitialize Event:
var gridObj = GridAPI.GridManager.GetGridById($parameters.WidgetId);
gridObj.provider.columnFooters.rows.push(new wijmo.grid.GroupRow());
gridObj.provider.bottomLeftCells.setCellData(0, 0, 'Σ');
Best Regards,
Daniel Figueira
Thanks @Daniel Figueira ,
That is the code behind that we are pursuing. Of course, our goal is to make it low code so every developer can use it.
Thanks,
Bruno Martinho
Thank you Daniel. I get the totalrow drawn as wanted with this approach, without values. How can I tell it to for example sum a specific number column?
Hi @sanjay kumar
You can see this on the OutSystems Data Grid Sample on this page.
Hi Bård,
Thank you for being such an active user of the grid! Many of your questions and requests have greatly helped us to add and prioritize features in our backlog!
This being said, thank you for bringing this to discussion - we've added this to our backlog, and did some preliminary tests (the results look promising)!
We'll keep you posted on the decision to add this feature or (at least) to provide a reasonable workaround to achieve it.
Cheers, RG
Hi Daniel Figueira,
Could you share the sample oml file for the same.
Thanks
To the people asking for this:
Outsystems implemented this functionality with the SetColumnAggregate client action.
You just need to:
More details Component docuumentation.
Special thanks to @Gonçalo Martins who add the link of the documentation!!!!