Skip to content

EqDataTable class

Represents Google data table class


The default constructor. ⊕ new EqDataTable(data?: any): EqDataTable

  • data: any, Optional - The table instance or its JSON representation.


Adds column.

▸ addColumn(type: string,label: string): void

  • type: string - The type.
  • label: string - The label.

Returns void


Creates empty rows.

▸ addRows(size: number): void

  • size: number - The number of empty rows.

Returns void


Gets the column ID.

▸ getColumnId(colIndex: number): string

  • colIndex: number - The column index.

Returns string - The column ID.


Gets the column LABEL.

▸ getColumnLabel(colIndex: number): string

  • colIndex: number - The column index.

Returns string - The column ID.


Gets the column object.

▸ getColumnObject(colIndex: number): any

  • colIndex: number - The column index.

Returns any - The column object.


Gets the column properties.

▸ getColumnProperties(colIndex: number): any

  • colIndex: number - The column index.

Returns any - The column properties.


Gets the column type.

▸ getColumnType(colIndex: number): string

  • colIndex: number - The column index.

Returns string - The column type.


Gets the formatted value.

▸ getFormattedValue(rowIndex: number,colIndex: number): string | null

  • rowIndex: number - The row index.
  • colIndex: number - The column index.

Returns string | null - The value.


Gets the number of columns

▸ getNumberOfColumns(): number

Returns number - The number.


Gets the number of rows.

▸ getNumberOfRows(): number

Returns number - The number.


Gets the google data table object.

▸ getObject(): any

Returns any - The data table.


Gets the value.

▸ getValue(rowIndex: number,colIndex: number): any

  • rowIndex: number
  • colIndex: number -

Returns any


Cheсks wether the table is empty

▸ isEmpty(): boolean

Returns boolean - true if the table is empty, false if it is not.


Loads data table from JSON.

▸ loadFromJSON(json: string): void

  • json: string - The JSON representation.

Returns void


Sets value to the cell.

▸ setCell(rowIndex: number,colIndex: number,value: any): void

  • rowIndex: number - The row.
  • colIndex: number - The column.
  • value: any - The value.

Returns void


▸ setDisplayFormats(options?: DataDisplayFormatterOptions): void

Returns void


Saves data table to JSON.

▸ toJSON(): string

Returns string - The JSON representation.