Interface CellType

Interface representing a cell in the grid. It is essentially the blueprint to a cell object. Contains definitions of properties and methods, relevant to a cell

Implemented by

Properties

active: boolean

Indicates whether the cell is currently active (focused).

cellID?: any

Optional; The cellID is the unique key, used to identify the cell

column: ColumnType

Represents the column that the cell belongs to.

editMode: boolean

Indicates whether the cell is currently in edit mode.

editValue: any

The value to display when the cell is in edit mode.

editable: boolean

Indicates whether the cell can be edited.

grid: GridType

Represents the grid instance containing the cell

id?: {
    columnID: number;
    rowID: any;
    rowIndex: number;
}

Optional; An object identifying the cell. It contains rowID, columnID, and rowIndex of the cell.

Type declaration

  • columnID: number
  • rowID: any
  • rowIndex: number
nativeElement?: HTMLElement

Represents the native HTML element of the cell itself

readonly?: boolean
row: RowType

Represents the row that the cell belongs to

selected: boolean

Indicates whether the cell is currently selected. It is false, if the sell is not selected, and true, if it is.

title?: any

An optional title to display for the cell

update: ((value) => void)

A method definition to update the value of the cell.

Type declaration

    • (value): void
    • Parameters

      • value: any

      Returns void

Optional; An object representing the validation state of the cell. Whether it's valid or invalid, and if it has errors

value: any

The current value of the cell.

visibleColumnIndex?: number

The index of the column that the cell belongs to. It counts only the visible (not hidden) columns

width: string

The CSS width of the cell as a string.

Methods

  • Optional; A method definition to calculate the size of the cell to fit the content The method can be used to calculate the size of the cell with the longest content and resize all cells to that size

    Parameters

    • range: any

    Returns number