When I enable summaries on a column, and I do groupings, how can I make the summary row appear for each group, instead of just the one main total at the bottom of the grid?
Also, for number data types, is there a way to specify which summaries I want? Specifically, I want the SUM but not any of the others. I'm not seeing that on the documentation.
Hello Scott,
The Group Summaries is scheduled for 7.1.0 version, which is planned for 14 December 2018. You can check the Ignite UI for Angular Roadmap here.
You can define which summaries you want by creating a custom class that extends IgxNumberSummaryOperand class. For example if you want only Sum summary you can define you custom class like this:
class SumSummary extends IgxNumberSummaryOperand { constructor() { super(); } operate(data?: any[]): IgxSummaryResult[] { var result = []; result.push({ key: 'sum', label: 'Sum', summaryResult: IgxNumberSummaryOperand.sum(data) }); return result; } }
And then in the template you should define your column like this:
<igx-column field="UnitsInStock" header="UnitsInStock" [summaries]="SumSummary" width="200px" [dataType]="'number'" > </igx-column>
Best regards, Martin Pavlov Infragistics, Inc.