Is there a way to display only the SUM in the summaries instead of the SUM, MIN, MAX, AVG, and Count.
I basically want a Totals row at the bottom of my table with the SUM only of each column. Is that possible?
Hello Ryan,
Yes, that's possible. What you need to do is to specify that you need only the "SUM" displayed. This is achieved through the "columnSettings" object in the "features" array. Here is a code sample:
...
features: [
{
name: "Summaries",
columnSettings: [
{ columnKey: "ProductID", allowSummaries: true, summaryOperands: [ { "rowDisplayLabel": "Summary", "type", "SUM", "active": true } ] },
{ columnKey: "Name", allowSummaries: true, summaryOperands: [ { "rowDisplayLabel": "Summary", "type", "SUM", "active": true } ] },
{ columnKey: "ProductNumber", allowSummaries: true, summaryOperands: [ { "rowDisplayLabel": "Summary", "type", "SUM", "active": true } ] }
]
}
You need to specify for each column that, you need only the "SUM" operation. You can also refer to this sample. If you have any additional questions, please don't hesitate to ask.
Thanks,
Martin Stoev
Okay, so I found the answer. There was a typo in your code. This worked for me.
{ columnKey: "ProductCount", allowSummaries: true, summaryOperands: [{ "rowDisplayLabel": "Total:", "type": "SUM", "active": true }]}, { columnKey: "ItemCount", allowSummaries: true, summaryOperands: [{ "rowDisplayLabel": "Total:", "type": "SUM", "active": true }]}