Interface ListGridAPI<T>

interface ListGridAPI<T> {
    allowRangePaste: boolean;
    canvas: HTMLCanvasElement;
    colCount: number;
    dataSource: DataSourceAPI<T>;
    defaultColWidth: string | number;
    defaultRowHeight: number;
    disabled: boolean;
    font?: string;
    frozenColCount: number;
    frozenRowCount: number;
    headerRowHeight: number | number[];
    headerValues: HeaderValues;
    keyboardOptions: null | DrawGridKeyboardOptions;
    leftCol: number;
    readOnly: boolean;
    recordRowCount: number;
    records: null | T[];
    rowCount: number;
    scrollLeft: number;
    scrollTop: number;
    selection: Selection;
    sortState: null | SortState;
    theme: null | RequiredThemeDefine;
    topRow: number;
    trimOnPaste: boolean;
    underlayBackgroundColor?: string;
    visibleColCount: number;
    visibleRowCount: number;
    addDisposable(disposable: {
        dispose(): void;
    }): void;
    configure(name: "fadeinWhenCallbackInPromise", value?: boolean): boolean;
    dispose(): void;
    doChangeValue(col: number, row: number, changeValueCallback: ((before: any) => any)): MaybePromise<boolean>;
    doGetCellValue(col: number, row: number, valueCallback: ((value: any) => void)): boolean;
    doSetPasteValue(text: string): void;
    doSetPasteValue(text: string, test: ((data: SetPasteValueTestData<T>) => boolean)): void;
    fireListeners<TYPE>(type: TYPE, ...event: ListGridEventHandlersEventMap<T>[TYPE]): ListGridEventHandlersReturnMap[TYPE][];
    focus(): void;
    focusCell(col: number, row: number): void;
    focusGridCell(field: FieldDef<T>, index: number): void;
    getAttachCellsArea(range: CellRange): {
        element: HTMLElement;
        rect: RectProps;
    };
    getCellAt(absoluteX: number, absoluteY: number): CellAddress;
    getCellOverflowText(col: number, row: number): null | string;
    getCellRange(col: number, row: number): CellRange;
    getCellRangeByField(field: FieldDef<T>, index: number): null | CellRange;
    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;
    getColumnAction(col: number, row: number): undefined | ColumnActionAPI;
    getColumnDefine(col: number, row: number): ColumnDefine<T>;
    getColumnType(col: number, row: number): ColumnTypeAPI;
    getElement(): HTMLElement;
    getField(col: number, row: number): undefined | FieldDef<T>;
    getGridCanvasHelper(): GridCanvasHelperAPI;
    getHeaderField(col: number, row: number): any;
    getHeaderValue(col: number, row: number): any;
    getLayoutCellId(col: number, row: number): LayoutObjectId;
    getMaxColWidth(col: number): undefined | string | number;
    getMinColWidth(col: number): undefined | string | number;
    getRecordIndexByRow(row: number): number;
    getRecordStartRowByRecordIndex(index: number): number;
    getRowAt(absoluteY: number): number;
    getRowHeight(row: number): number;
    getRowRecord(row: number): MaybePromiseOrUndef<T>;
    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: ListGridEventHandlersEventMap<T>[TYPE]) => ListGridEventHandlersReturnMap[TYPE])): number;
    makeVisibleCell(col: number, row: number): void;
    makeVisibleGridCell(field: FieldDef<T>, index: 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;
    setHeaderValue(col: number, row: number, newValue: any): 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;
}

Type Parameters

  • T

Hierarchy (view full)

Implemented by

Properties

allowRangePaste: boolean
canvas: HTMLCanvasElement
colCount: number
dataSource: DataSourceAPI<T>
defaultColWidth: string | number
defaultRowHeight: number
disabled: boolean
font?: string
frozenColCount: number
frozenRowCount: number
headerRowHeight: number | number[]
headerValues: HeaderValues
keyboardOptions: null | DrawGridKeyboardOptions
leftCol: number
readOnly: boolean
recordRowCount: number
records: null | T[]
rowCount: number
scrollLeft: number
scrollTop: number
selection: Selection
sortState: null | SortState
theme: null | RequiredThemeDefine
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

  • Parameters

    • col: number
    • row: number
    • changeValueCallback: ((before: any) => any)
        • (before): any
        • Parameters

          • before: any

          Returns any

    Returns MaybePromise<boolean>

  • Parameters

    • col: number
    • row: number
    • valueCallback: ((value: any) => void)
        • (value): void
        • Parameters

          • value: any

          Returns void

    Returns boolean

  • Parameters

    • text: string

    Returns void

  • Parameters

    Returns void

  • Parameters

    • col: number
    • row: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • absoluteX: number

    Returns number

  • Parameters

    • col: number
    • row: number

    Returns undefined | FieldDef<T>

  • Parameters

    • col: number
    • row: number

    Returns any

  • Parameters

    • col: number
    • row: number

    Returns any

  • Parameters

    • col: number

    Returns undefined | string | number

  • Parameters

    • col: number

    Returns undefined | string | number

  • Parameters

    • row: number

    Returns number

  • Parameters

    • index: number

    Returns number

  • Parameters

    • absoluteY: number

    Returns number

  • Parameters

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

    Returns void

  • Parameters

    • col: number
    • row: number

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

  • Parameters

    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
    • newValue: any

    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