Class AggregateCellRenderer

Writes the formatted text of a cell (areaModel.getTextValueAt) as a text node – never as HTML – in the label structure of a normal cell (.ge-table-label-div > .ge-table-label). AreaModelAggregateFooter uses it for its results ("1,234.5" instead of the raw 1234.4999999) and labels when the column has no footer renderer.

Example

// an own footer model that formats in getTextValueAt and shows that text
class MyFooter extends AreaModel {
private readonly renderer = new AggregateCellRenderer();
override getCellRenderer(_row: number, _col: number): CellRendererIf { return this.renderer; }
override getTextValueAt(_row: number, _col: number): string { return "Σ 42"; }
}

Since

1.1.94

Hierarchy

  • AggregateCellRenderer

Implements

Constructors

Properties

Methods

Constructors

Properties

type: "AggregateCellRenderer" = "AggregateCellRenderer"

Marker (works across copies of the core).

Methods

  • Fills the (empty) cell element.

    Parameters

    • cellDiv: HTMLDivElement

      the cell element, already positioned and sized

    • rowIndex: number

      row in the area (as displayed)

    • columnIndex: number

      column index (west + center + east)

    • areaIdent: AreaIdent

      "header", "body" or "footer"

    • areaModel: AreaModelIf

      the model of this area (e.g. for getRowByIndex(rowIndex))

    • _cellValue: any

      the value of the cell (areaModel.getValueAt(rowIndex, columnIndex))

    • domService: DomServiceIf

      create and change elements through it (works with Angular's Renderer2, too)

    Returns undefined | Function

    optionally a cleanup function, called before the cell is drawn again