Executes the static methods and returns IgxSummaryResult[].
IgxSummaryResult[]
interface IgxSummaryResult { key: string; label: string; summaryResult: any;} Copy
interface IgxSummaryResult { key: string; label: string; summaryResult: any;}
Can be overridden in the inherited classes to provide customization for the summary.
summary
class CustomDateSummary extends IgxDateSummaryOperand { constructor() { super(); } public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] { const result = super.operate(data, allData, fieldName, groupRecord); result.push({ key: "deadline", label: "Deadline Date", summaryResult: this.calculateDeadline(data); }); return result; }}this.grid.getColumnByName('ColumnName').summaries = CustomDateSummary; Copy
class CustomDateSummary extends IgxDateSummaryOperand { constructor() { super(); } public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] { const result = super.operate(data, allData, fieldName, groupRecord); result.push({ key: "deadline", label: "Deadline Date", summaryResult: this.calculateDeadline(data); }); return result; }}this.grid.getColumnByName('ColumnName').summaries = CustomDateSummary;
IgxDateSummaryOperand
Static
Counts all the records in the data source. If filtering is applied, counts only the filtered records.
IgxSummaryOperand.count(dataSource); Copy
IgxSummaryOperand.count(dataSource);
IgxSummaryOperand
Returns the earliest date value in the data records. If filtering is applied, returns the latest date value in the filtered data records.
IgxDateSummaryOperand.earliest(data); Copy
IgxDateSummaryOperand.earliest(data);
Returns the latest date value in the data records. If filtering is applied, returns the latest date value in the filtered data records.
IgxDateSummaryOperand.latest(data); Copy
IgxDateSummaryOperand.latest(data);
Executes the static methods and returns
IgxSummaryResult[]
.Can be overridden in the inherited classes to provide customization for the
summary
.