Search results

AggregateColumnDirective API in Angular TreeGrid API component

e-aggregate->e-column directive represent a aggregate column of the Angular TreeGrid.

<ejs-treegrid [dataSource]='data' allowPaging='true' allowSorting='true'>
  <e-columns>
    <e-column field='ID' width='100'></e-column>
    <e-column field='name' headerText='Name' width='100'></e-column>
  </e-columns>
  <e-aggregates>
    <e-aggregate>
      <e-columns>
        <e-column field='ID' type='Min'></e-column>
      </e-columns>
     </e-aggregate>
   </e-aggregates>
</ejs-treegrid>

Properties

columnName

any

Defines the column name to display the aggregate value. If columnName is not defined, then field name value will be assigned to the columnName property.

Defaults to null

customAggregate

any

Defines a function to calculate custom aggregate value. The type value should be set to custom. To use custom aggregate value in the template, use the key as ${custom}. Total aggregation: The custom function will be called with the whole data and the current AggregateColumn object. Group aggregation: This will be called with the current group details and the AggregateColumn object.

Defaults to null

field

any

Defines the column name to perform aggregation.

Defaults to null

footerTemplate

any

Defines the footer cell template as a string for the aggregate column. The type name should be used to access aggregate values inside the template.

Defaults to null

format

any

Format is applied to a calculated value before it is displayed. Gets the format from the user, which can be standard or custom number and date formats.

Defaults to null

type

any

Defines the aggregate type of a particular column. To use multiple aggregates for single column, specify the type as array. Types of aggregate are,

  • sum
  • average
  • max
  • min
  • count
  • falsecount
  • truecount
  • custom

    Specify the type value as custom to use custom aggregation.

Defaults to null