Aggregate value on dynamic columns

Posted by: bhati.bhati on 17 July 2020, 3:12 am EST

    • Post Options:
    • Link

    Posted 17 July 2020, 3:12 am EST

    Hi,

    I want to display aggregate values on dynamically binded numeric columns.

    Can someone help on this.

    ex:

    <wj-flex-grid [headersVisibility]=“‘Column’” [isReadOnly]=“true” (formatItem)=“FormatItem(flexReports, $event)” [showAlternatingRows]=“false” #flexReports style=“width:100%;height:550px;”>



    this.flexReports.itemsSource = this.records;

    Thanks,

    Deepak

  • Posted 20 July 2020, 12:01 am EST

    Hi team,

    any update on this issue. Kindly help.

    Thanks,

    Deepak

  • Posted 20 July 2020, 2:50 am EST

    Hi Deepak,

    If you have dynamic columns and need to add aggregates for each numeric columns, then handle the loadedRows event of the FlexGrid, iterate over each column, check whether they are numeric and set their aggregate property. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-spo621

    Regards,

    Ashwin

  • Posted 20 July 2020, 3:48 am EST

    Thanks Ashwin its working.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels