Class IgxSummaryOperand

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

operate

  • operate(data?: any[], allData?: any[], fieldName?: string): IgxSummaryResult[]
  • 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): IgxSummaryResult[] {
        const result = [];
        result.push({
          key: "test",
          label: "Test",
          summaryResult: IgxSummaryOperand.count(data)
        });
        return result;
      }
    }
    this.grid.getColumnByName('ColumnName').summaries = CustomSummary;
    
    @memberof

    IgxSummaryOperand

    Parameters

    • data: any[] = []
    • allData: any[] = []
    • Optional fieldName: string

    Returns IgxSummaryResult[]

Static count

  • count(data: any[]): number