Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ListGrid<T>

Cheetah Grid

namespace

cheetahGrid

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

Properties

disabled

disabled: boolean = false

readOnly

readOnly: boolean = false

Accessors

allowRangePaste

  • get allowRangePaste(): boolean
  • set allowRangePaste(allowRangePaste: boolean): void
  • If set to true to allow pasting of ranges.

    Returns boolean

  • If set to true to allow pasting of ranges.

    Parameters

    • allowRangePaste: boolean

    Returns void

canvas

  • get canvas(): HTMLCanvasElement
  • Get canvas element.

    Returns HTMLCanvasElement

colCount

  • get colCount(): number
  • set colCount(colCount: number): void
  • Get the number of columns.

    Returns number

  • Set the number of columns.

    Parameters

    • colCount: number

    Returns void

dataSource

defaultColWidth

  • get defaultColWidth(): string | number
  • set defaultColWidth(defaultColWidth: string | number): void
  • Get the default column width.

    Returns string | number

  • Set the default column width.

    Parameters

    • defaultColWidth: string | number

    Returns void

defaultRowHeight

  • get defaultRowHeight(): number
  • set defaultRowHeight(defaultRowHeight: number): void
  • Get the default row height.

    Returns number

  • Set the default row height.

    Parameters

    • defaultRowHeight: number

    Returns void

font

  • get font(): string
  • set font(font: string): void
  • Get the font definition as a string.

    override

    Returns string

  • Set the font definition with the given string.

    override

    Parameters

    • font: string

    Returns void

frozenColCount

  • get frozenColCount(): number
  • set frozenColCount(frozenColCount: number): void
  • Get the number of frozen columns.

    Returns number

  • Set the number of frozen columns.

    Parameters

    • frozenColCount: number

    Returns void

frozenRowCount

  • get frozenRowCount(): number
  • set frozenRowCount(frozenRowCount: number): void
  • Get the number of frozen rows.

    Returns number

  • Set the number of frozen rows.

    Parameters

    • frozenRowCount: number

    Returns void

header

  • Gets the define of the header.

    Returns HeadersDefine<T>

  • Sets the define of the header with the given data.

    column options
    -----
    caption: header caption
    field: field name
    width: column width
    minWidth: column min width
    maxWidth: column max width
    icon: icon name
    message: message key name
    columnType: column type
    action: column action
    style: column style
    headerType: header type
    headerStyle: header style
    headerAction: header action
    headerField: header field name
    sort: define sort setting
    -----

    multiline header

    caption: header caption columns: columns define


    Parameters

    Returns void

headerValues

keyboardOptions

layout

  • get layout(): LayoutDefine<T>
  • set layout(layout: LayoutDefine<T>): void
  • Gets the define of the layout.

    Returns LayoutDefine<T>

  • Sets the define of the layout with the given data.

    Parameters

    • layout: LayoutDefine<T>

    Returns void

leftCol

  • get leftCol(): number
  • Get the index of the first column in the scrollable region that is visible.

    Returns number

recordRowCount

  • get recordRowCount(): number

records

  • get records(): null | T[]
  • set records(records: null | T[]): void

rowCount

  • get rowCount(): number
  • set rowCount(rowCount: number): void
  • Get the number of rows.

    Returns number

  • Set the number of rows.

    Parameters

    • rowCount: number

    Returns void

scrollLeft

  • get scrollLeft(): number
  • set scrollLeft(scrollLeft: number): void
  • gets or sets the number of pixels that an element's content is scrolled from its left edge

    Returns number

  • gets or sets the number of pixels that an element's content is scrolled from its left edge

    Parameters

    • scrollLeft: number

    Returns void

scrollTop

  • get scrollTop(): number
  • set scrollTop(scrollTop: number): void
  • gets or sets the number of pixels that an element's content is scrolled vertically

    Returns number

  • gets or sets the number of pixels that an element's content is scrolled vertically

    Parameters

    • scrollTop: number

    Returns void

selection

  • get selection(): Selection
  • Get the selection instance.

    Returns Selection

sortState

theme

  • get theme(): null | Theme
  • set theme(theme: null | Theme): void
  • Get the theme.

    Returns null | Theme

  • Set the theme from given

    Parameters

    • theme: null | Theme

    Returns void

topRow

  • get topRow(): number
  • Get the index of the first row in the scrollable region that is visible.

    Returns number

underlayBackgroundColor

  • get underlayBackgroundColor(): string
  • set underlayBackgroundColor(underlayBackgroundColor: string): void
  • Get the background color of the underlay.

    override

    Returns string

  • Set the background color of the underlay.

    override

    Parameters

    • underlayBackgroundColor: string

    Returns void

visibleColCount

  • get visibleColCount(): number
  • Get the number of scrollable columns fully visible in the grid. visibleColCount does not include the frozen columns counted by the frozenColCount property. It does not include any partially visible columns on the right of the grid.

    Returns number

visibleRowCount

  • get visibleRowCount(): number
  • Get the number of scrollable rows fully visible in the grid. visibleRowCount does not include the frozen rows counted by the frozenRowCount property. It does not include any partially visible rows on the bottom of the grid.

    Returns number

Static EVENT_TYPE

  • get EVENT_TYPE(): ListGridEvents
  • Returns ListGridEvents

Methods

addDisposable

  • addDisposable(disposable: { dispose: any }): void

addEventListener

  • addEventListener(type: string, listener: AnyFunction): void

configure

  • configure(name: "fadeinWhenCallbackInPromise", value?: boolean): boolean

dispose

  • dispose(): void

doChangeValue

  • doChangeValue(col: number, row: number, changeValueCallback: (before: any) => any): MaybePromise<boolean>
  • Parameters

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

          • before: any

          Returns any

    Returns MaybePromise<boolean>

doGetCellValue

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

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

          • value: any

          Returns void

    Returns boolean

doSetPasteValue

fireListeners

focus

  • focus(): void

focusCell

  • focusCell(col: number, row: number): void

focusGridCell

  • focusGridCell(field: FieldDef<T>, index: number): void

getAttachCellsArea

  • getAttachCellsArea(range: CellRange): { element: HTMLElement; rect: Rect }

getCellAt

  • getCellAt(absoluteX: number, absoluteY: number): CellAddress

getCellOverflowText

  • getCellOverflowText(col: number, row: number): null | string

getCellRange

  • getCellRange(col: number, row: number): CellRange
  • Get cell range information for a given cell.

    Parameters

    • col: number

      column index of the cell

    • row: number

      row index of the cell

    Returns CellRange

    cell range info

getCellRangeByField

getCellRangeRect

getCellRect

  • getCellRect(col: number, row: number): Rect
  • Get the rect of the cell.

    Parameters

    • col: number

      index of column, of the cell

    • row: number

      index of row, of the cell

    Returns Rect

    the rect of the cell.

getCellRelativeRect

  • getCellRelativeRect(col: number, row: number): Rect

getCellsRect

  • getCellsRect(startCol: number, startRow: number, endCol: number, endRow: number): Rect
  • Get the rectangle of the cells area.

    Parameters

    • startCol: number

      index of the starting column, of the cell

    • startRow: number

      index of the starting row, of the cell

    • endCol: number

      index of the ending column, of the cell

    • endRow: number

      index of the ending row, of the cell

    Returns Rect

    the rect of the cells.

getColAt

  • getColAt(absoluteX: number): number

getColWidth

  • getColWidth(col: number): number

getColumnDefine

  • Get the column define of the given column index.

    Parameters

    • col: number

      The column index.

    • row: number

      The row index.

    Returns ColumnDefine<T>

    The column define object.

getColumnIndexByField

  • getColumnIndexByField(field: FieldDef<T>): null | number
  • Get the column index of the given field.

    deprecated

    use getCellRangeByField instead

    Parameters

    Returns null | number

    The column index.

getColumnType

getElement

  • getElement(): HTMLElement

getField

  • getField(col: number, row: number): undefined | FieldDef<T>
  • Get the field of the given column index.

    Parameters

    • col: number

      The column index.

    • row: number

      The row index.

    Returns undefined | FieldDef<T>

    The field object.

getGridCanvasHelper

  • getGridCanvasHelper(): GridCanvasHelper<T>

getHeaderCellRange

  • getHeaderCellRange(col: number, row: number): CellRange
  • Get header range information for a given cell.

    deprecated

    use getCellRange instead

    Parameters

    • col: number

      column index of the cell

    • row: number

      row index of the cell

    Returns CellRange

    cell range info

getHeaderDefine

  • Get the header define of the given header cell.

    Parameters

    • col: number

      The column index.

    • row: number

      The header row index.

    Returns HeaderDefine<T>

    The header define object.

getHeaderField

  • getHeaderField(col: number, row: number): any
  • Get the header field of the given header cell.

    Parameters

    • col: number

      The column index.

    • row: number

      The header row index.

    Returns any

    The field object.

getHeaderValue

  • getHeaderValue(col: number, row: number): any

getLayoutCellId

getMaxColWidth

  • getMaxColWidth(col: number): undefined | string | number

getMinColWidth

  • getMinColWidth(col: number): undefined | string | number

getRecordIndexByRow

  • getRecordIndexByRow(row: number): number

getRecordStartRowByRecordIndex

  • getRecordStartRowByRecordIndex(index: number): number

getRowAt

  • getRowAt(absoluteY: number): number

getRowHeight

  • getRowHeight(row: number): number

getRowRecord

hasFocusGrid

  • hasFocusGrid(): boolean

hasListeners

  • hasListeners(type: string): boolean

invalidate

  • invalidate(): void

invalidateCell

  • invalidateCell(col: number, row: number): void

invalidateCellRange

invalidateGridRect

  • invalidateGridRect(startCol: number, startRow: number, endCol?: number, endRow?: number): void
  • Redraws the range of the given cells.

    Parameters

    • startCol: number

      index of the starting column, of the cell

    • startRow: number

      index of the starting row, of the cell

    • endCol: number = startCol

      index of the ending column, of the cell

    • endRow: number = startRow

      index of the ending row, of the cell

    Returns void

isFrozenCell

  • isFrozenCell(col: number, row: number): null | { col: boolean; row: boolean }

listen

  • Adds an event listener.

    Parameters

    • type: string

      The event type id.

    • listener: AnyFunction

      Callback method.

    Returns number

    unique id for the listener.

makeVisibleCell

  • makeVisibleCell(col: number, row: number): void

makeVisibleGridCell

  • makeVisibleGridCell(field: FieldDef<T>, index: number): void

onKeyDownMove

  • onKeyDownMove(evt: KeyboardEvent): void

removeEventListener

  • removeEventListener(type: string, listener: AnyFunction): void

setCellOverflowText

  • setCellOverflowText(col: number, row: number, overflowText: string | false): void
  • Set the overflowed text in the cell rectangle, to the given cell.

    Parameters

    • col: number

      The column index.

    • row: number

      The row index

    • overflowText: string | false

      The overflowed text in the cell rectangle.

    Returns void

setColWidth

  • setColWidth(col: number, width: string | number): void
  • Set the column widtht of the given the column index.

    Parameters

    • col: number

      The column index

    • width: string | number

      The column width

    Returns void

setFocusCursor

  • setFocusCursor(col: number, row: number): void

setHeaderValue

  • setHeaderValue(col: number, row: number, newValue: any): void

setMaxColWidth

  • setMaxColWidth(col: number, maxwidth: string | number): void
  • Set the column max widtht of the given the column index.

    Parameters

    • col: number

      The column index

    • maxwidth: string | number

      The column max width

    Returns void

setMinColWidth

  • setMinColWidth(col: number, minwidth: string | number): void
  • Set the column min widtht of the given the column index.

    Parameters

    • col: number

      The column index

    • minwidth: string | number

      The column min width

    Returns void

setRowHeight

  • setRowHeight(row: number, height: number): void

unlisten

  • unlisten(id: number): void
  • Removes an event listener which was added with listen() by the id returned by listen().

    Parameters

    • id: number

      the id returned by listen().

    Returns void

updateScroll

  • updateScroll(): boolean

updateSize

  • updateSize(): void

Generated using TypeDoc