Constructors
Section titled "Constructors"IgxSummaryOperand
new IgxSummaryOperand(): IgxSummaryOperand Returns IgxSummaryOperand
Methods
Section titled "Methods"operate
Section titled "operate"Executes the static count method and returns IgxSummaryResult[].
interface IgxSummaryResult {
key: string;
label: string;
summaryResult: any;
}Can be overridden in the inherited classes to provide customization for the summary.
class CustomSummary extends IgxSummaryOperand {
constructor() {
super();
}
public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {
const result = [];
result.push({
key: "test",
label: "Test",
summaryResult: IgxSummaryOperand.count(data)
});
return result;
}
}
this.grid.getColumnByName('ColumnName').summaries = CustomSummary;operate(data: any[], _allData: any[], _fieldName: string, _groupRecord: IGroupByRecord): IgxSummaryResult[] Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:51
Parameters
- data:
any[] - _allData:
any[] - _fieldName:
string - _groupRecord:
IGroupByRecord
Returns IgxSummaryResult[]
count
Section titled "count"Counts all the records in the data source. If filtering is applied, counts only the filtered records.
IgxSummaryOperand.count(dataSource);count(data: any[]): number Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:18
Parameters
- data:
any[]