Class ListGrid<T>

ListGrid

cheetahGrid.ListGrid

cheetahGrid

Type Parameters

  • T

Hierarchy (view full)

Implements

Constructors

Properties

disabled: boolean = false
readOnly: boolean = false

Accessors

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

    Returns boolean

  • set allowRangePaste(allowRangePaste): void
  • Parameters

    • allowRangePaste: boolean

    Returns void

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

    Returns HTMLCanvasElement

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

    Returns number

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

    Parameters

    • colCount: number

    Returns void

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

    Returns string | number

  • set defaultColWidth(defaultColWidth): void
  • Set the default column width.

    Parameters

    • defaultColWidth: string | number

    Returns void

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

    Returns number

  • set defaultRowHeight(defaultRowHeight): void
  • Set the default row height.

    Parameters

    • defaultRowHeight: number

    Returns void

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

    Returns string

  • set font(font): void
  • Set the font definition with the given string.

    Parameters

    • font: string

    Returns void

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

    Returns number

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

    Parameters

    • frozenColCount: number

    Returns void

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

    Returns number

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

    Parameters

    • frozenRowCount: number

    Returns void

  • get header(): HeadersDefine<T>
  • Gets the define of the header.

    Returns HeadersDefine<T>

  • set header(header): void
  • 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 definition
    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
    headerIcon: header icon definition
    sort: define sort setting
    -----
    
    multiline header
    -----
    caption: header caption
    columns: columns define
    -----
    

    Parameters

    Returns void

  • get headerRowHeight(): number | number[]
  • Gets the define of the headerRowHeight.

    Returns number | number[]

  • set headerRowHeight(headerRowHeight): void
  • Sets the define of the headerRowHeight with the given data.

    Parameters

    • headerRowHeight: number | number[]

    Returns void

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

    Returns LayoutDefine<T>

  • set layout(layout): void
  • Sets the define of the layout with the given data.

    Parameters

    • layout: LayoutDefine<T>

    Returns void

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

    Returns number

  • get records(): null | T[]
  • Get the records.

    Returns null | T[]

  • set records(records): void
  • Set the records from given

    Parameters

    • records: null | T[]

    Returns void

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

    Returns number

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

    Parameters

    • rowCount: number

    Returns void

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

    Returns number

  • set scrollLeft(scrollLeft): void
  • Parameters

    • scrollLeft: number

    Returns void

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

    Returns number

  • set scrollTop(scrollTop): void
  • Parameters

    • scrollTop: number

    Returns void

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

    Returns Selection

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

    Returns null | Theme

  • set theme(theme): void
  • Set the theme from given

    Parameters

    • theme: null | Theme

    Returns void

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

    Returns number

  • get trimOnPaste(): boolean
  • If set to true, trim the pasted text on pasting.

    Returns boolean

  • set trimOnPaste(trimOnPaste): void
  • Parameters

    • trimOnPaste: boolean

    Returns void

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

    Returns string

  • set underlayBackgroundColor(underlayBackgroundColor): void
  • Set the background color of the underlay.

    Parameters

    • underlayBackgroundColor: string

    Returns void

  • 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

  • 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

  • get EVENT_TYPE(): ListGridEvents
  • Returns ListGridEvents

Methods

  • 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

  • Focus the cell.

    Parameters

    • col: number

      The column index.

    • row: number

      The row index

    Returns void

  • Focus the cell.

    Parameters

    • field: FieldDef<T>

      The field.

    • index: number

      The record index

    Returns void

  • Get the overflowed text in the cell rectangle, from the given cell.

    Parameters

    • col: number

      The column index.

    • row: number

      The row index

    Returns null | string

    The text overflowing the cell rect.

  • 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

  • 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.

  • Get the relative rectangle 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.

  • 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.

  • Get the column width of the given the column index.

    Parameters

    • col: number

      The column index

    Returns number

    The column width

  • Get the column index of the given field.

    Parameters

    Returns null | number

    The column index.

    use getCellRangeByField instead

  • 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.

  • Get header 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

    use getCellRange instead

  • 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.

  • 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.

  • Get the column max width of the given the column index.

    Parameters

    • col: number

      The column index

    Returns undefined | string | number

    The column max width

  • Get the column min width of the given the column index.

    Parameters

    • col: number

      The column index

    Returns undefined | string | number

    The column min width

  • Get the record index of the given row index.

    Parameters

    • row: number

      The row index.

    Returns number

  • Gets the row index starting at the given record index.

    Parameters

    • index: number

      The record index.

    Returns number

  • Parameters

    • type: string

    Returns boolean

  • Redraws the range of the given cell.

    Parameters

    • col: number

      The column index of cell.

    • row: number

      The row index of cell.

    Returns 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

  • Parameters

    • col: number
    • row: number

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

  • Adds an event listener.

    Parameters

    • type: string

      The event type id.

    • listener: AnyFunction

      Callback method.

    Returns number

    unique id for the listener.

  • Scroll to where cell is visible.

    Parameters

    • field: FieldDef<T>

      The field.

    • index: number

      The record index

    Returns 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

  • Set the column width of the given the column index.

    Parameters

    • col: number

      The column index

    • width: null | string | number

      The column width

    Returns void

  • Parameters

    • col: number
    • row: number
    • newValue: any

    Returns void

  • Set the column max width of the given the column index.

    Parameters

    • col: number

      The column index

    • maxwidth: null | string | number

      The column max width

    Returns void

  • Set the column min width of the given the column index.

    Parameters

    • col: number

      The column index

    • minwidth: null | string | number

      The column min width

    Returns void

  • Set the row height of the given the row index.

    Parameters

    • row: number

      The row index

    • height: null | number

      The row height

    Returns 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