Interface DrawGridAPI

interface DrawGridAPI {
    canvas: HTMLCanvasElement;
    colCount: number;
    defaultColWidth: string | number;
    defaultRowHeight: number;
    font?: string;
    frozenColCount: number;
    frozenRowCount: number;
    keyboardOptions: null | DrawGridKeyboardOptions;
    leftCol: number;
    rowCount: number;
    scrollLeft: number;
    scrollTop: number;
    selection: Selection;
    topRow: number;
    trimOnPaste: boolean;
    underlayBackgroundColor?: string;
    visibleColCount: number;
    visibleRowCount: number;
    addDisposable(disposable: {
        dispose(): void;
    }): void;
    configure(name: "fadeinWhenCallbackInPromise", value?: boolean): boolean;
    dispose(): void;
    focus(): void;
    focusCell(col: number, row: number): void;
    getAttachCellsArea(range: CellRange): {
        element: HTMLElement;
        rect: RectProps;
    };
    getCellAt(absoluteX: number, absoluteY: number): CellAddress;
    getCellOverflowText(col: number, row: number): null | string;
    getCellRangeRect(cellRange: CellRange): RectProps;
    getCellRect(col: number, row: number): RectProps;
    getCellRelativeRect(col: number, row: number): RectProps;
    getCellsRect(startCol: number, startRow: number, endCol: number, endRow: number): RectProps;
    getColAt(absoluteX: number): number;
    getColWidth(col: number): number;
    getElement(): HTMLElement;
    getMaxColWidth(col: number): undefined | string | number;
    getMinColWidth(col: number): undefined | string | number;
    getRowAt(absoluteY: number): number;
    getRowHeight(row: number): number;
    hasFocusGrid(): boolean;
    invalidate(): void;
    invalidateCell(col: number, row: number): void;
    invalidateCellRange(cellRange: CellRange): void;
    invalidateGridRect(startCol: number, startRow: number, endCol?: number, endRow?: number): void;
    isFrozenCell(col: number, row: number): null | {
        col: boolean;
        row: boolean;
    };
    listen<TYPE>(type: TYPE, listener: ((...event: DrawGridEventHandlersEventMap[TYPE]) => DrawGridEventHandlersReturnMap[TYPE])): number;
    listen(type: string, listener: AnyFunction): number;
    makeVisibleCell(col: number, row: number): void;
    onKeyDownMove(evt: KeyboardEvent): void;
    setCellOverflowText(col: number, row: number, overflowText: string | false): void;
    setColWidth(col: number, width: null | string | number): void;
    setFocusCursor(col: number, row: number): void;
    setMaxColWidth(col: number, maxwidth: string | number): void;
    setMinColWidth(col: number, minwidth: string | number): void;
    setRowHeight(row: number, height: number): void;
    updateScroll(): boolean;
    updateSize(): void;
}

Hierarchy (view full)

Implemented by

Properties

canvas: HTMLCanvasElement
colCount: number
defaultColWidth: string | number
defaultRowHeight: number
font?: string
frozenColCount: number
frozenRowCount: number
keyboardOptions: null | DrawGridKeyboardOptions
leftCol: number
rowCount: number
scrollLeft: number
scrollTop: number
selection: Selection
topRow: number
trimOnPaste: boolean
underlayBackgroundColor?: string
visibleColCount: number
visibleRowCount: number

Methods

  • Parameters

    • disposable: {
          dispose(): void;
      }
      • dispose:function
        • Returns void

    Returns void

  • Parameters

    • name: "fadeinWhenCallbackInPromise"
    • Optionalvalue: boolean

    Returns boolean

  • Returns void

  • Returns void

  • Parameters

    • col: number
    • row: number

    Returns void

  • Parameters

    Returns {
        element: HTMLElement;
        rect: RectProps;
    }

  • Parameters

    • col: number
    • row: number

    Returns null | string

  • Parameters

    • startCol: number
    • startRow: number
    • endCol: number
    • endRow: number

    Returns RectProps

  • Parameters

    • absoluteX: number

    Returns number

  • Parameters

    • col: number

    Returns number

  • Returns HTMLElement

  • Parameters

    • col: number

    Returns undefined | string | number

  • Parameters

    • col: number

    Returns undefined | string | number

  • Parameters

    • absoluteY: number

    Returns number

  • Parameters

    • row: number

    Returns number

  • Returns boolean

  • Returns void

  • Parameters

    • col: number
    • row: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • startCol: number
    • startRow: number
    • OptionalendCol: number
    • OptionalendRow: number

    Returns void

  • Parameters

    • col: number
    • row: number

    Returns null | {
        col: boolean;
        row: boolean;
    }

  • Parameters

    • col: number
    • row: number

    Returns void

  • Parameters

    • evt: KeyboardEvent

    Returns void

  • Parameters

    • col: number
    • row: number
    • overflowText: string | false

    Returns void

  • Parameters

    • col: number
    • width: null | string | number

    Returns void

  • Parameters

    • col: number
    • row: number

    Returns void

  • Parameters

    • col: number
    • maxwidth: string | number

    Returns void

  • Parameters

    • col: number
    • minwidth: string | number

    Returns void

  • Parameters

    • row: number
    • height: number

    Returns void

  • Returns boolean

  • Returns void