EasyGrid class

Index

Constructors

Public Properties

Protected Properties

Public Accessors

Public Methods

Protected Methods

Constructors


constructor

⊕ new EasyGrid(options: EasyGridOptions): EasyGrid

Parameters:


Public Properties


cellRendererStore

● cellRendererStore: GridCellRendererStore


options

● options: EasyGridOptions


Protected Properties


bodyCellContainerDiv

● bodyCellContainerDiv: HTMLDivElement


bodyDiv

● bodyDiv: HTMLDivElement


bodyViewportDiv

● bodyViewportDiv: HTMLDivElement


columns

● columns: GridColumnList


cssPrefix

● cssPrefix: string = "keg"


dataTable

● dataTable: EasyDataTable


eventEmitter

● eventEmitter: EventEmitter


footerDiv

● footerDiv: HTMLDivElement


footerPaginateDiv

● footerPaginateDiv: HTMLDivElement


headerCellContainerDiv

● headerCellContainerDiv: HTMLDivElement


headerDiv

● headerDiv: HTMLDivElement


headerRowDiv

● headerRowDiv: HTMLDivElement


headerViewportDiv

● headerViewportDiv: HTMLDivElement


rootDiv

● rootDiv: HTMLDivElement


slot

● slot: HTMLElement


tableCss

● tableCss?: string


Public Accessors


activeRowIndex

⇄ get activeRowIndex(): number

Returns number


⇄ set activeRowIndex(value: number): void

Parameters:

  • value: number

Returns void


Public Methods


addEventListener

▸ addEventListener(eventType: "init",handler: () => void): string

Parameters:

  • eventType: "init"
  • handler: () => void

Returns string

▸ addEventListener(eventType: "rowClick",handler: (ev: RowClickEvent) => void): string

Parameters:

Returns string

▸ addEventListener(eventType: "rowDbClick",handler: (ev: RowClickEvent) => void): string

Parameters:

Returns string

▸ addEventListener(eventType: "pageChanged",handler: (ev: PageChangedEvent) => void): string

Parameters:

Returns string

▸ addEventListener(eventType: "addColumnClick",handler: (ev: AddColumnClickEvent) => void): string

Parameters:

Returns string

▸ addEventListener(eventType: "columnChanged",handler: (ev: ColumnChangedEvent) => void): string

Parameters:

Returns string

▸ addEventListener(eventType: "columnMoved",handler: (ev: ColumnMovedEvent) => void): string

Parameters:

Returns string

▸ addEventListener(eventType: "columnDeleted",handler: (ev: ColumnDeletedEvent) => void): string

Parameters:

Returns string

▸ addEventListener(eventType: "activeRowChanged",handler: (ev: ActiveRowChangedEvent) => void): string

Parameters:

Returns string


clear

▸ clear(): void

Returns void


destroy

▸ destroy(): void

Returns void


ensureRowVisibility

▸ ensureRowVisibility(rowOrIndex: HTMLElement | number): void

Parameters:

  • rowOrIndex: HTMLElement | number

Returns void


fireEvent

▸ fireEvent(event: GridEvent | GridEventType): void

Parameters:

Returns void


focus

▸ focus(): void

Returns void


getColumns

▸ getColumns(): GridColumnList

Returns GridColumnList


getData

▸ getData(): EasyDataTable

Returns EasyDataTable


refresh

▸ refresh(): void

Returns void


removeEventListener

▸ removeEventListener(eventType: string,handlerId: string): void

Parameters:

  • eventType: string
  • handlerId: string

Returns void


setData

▸ setData(data: EasyDataTable): void

Parameters:

Returns void


Protected Methods


clearDOM

▸ clearDOM(): void

Returns void


getGlobalIndexByLocal

▸ getGlobalIndexByLocal(index: number): number

Parameters:

  • index: number

Returns number


getLocalIndexByGlobal

▸ getLocalIndexByGlobal(index: number): number

Parameters:

  • index: number

Returns number


hasData

▸ hasData(): boolean

Returns boolean


hideProgress

▸ hideProgress(): void

Returns void


init

▸ init(options: EasyGridOptions): void

Parameters:

Returns void


render

▸ render(): void

Returns void


renderAddColumnButton

▸ renderAddColumnButton(): HTMLElement

Returns HTMLElement


renderBody

▸ renderBody(): void

Returns void


renderCell

▸ renderCell(column: GridColumn,colIndex: number,value: any,rowElement: HTMLElement): HTMLDivElement

Parameters:

  • column: GridColumn
  • colIndex: number
  • value: any
  • rowElement: HTMLElement

Returns HTMLDivElement


renderColumnHeader

▸ renderColumnHeader(column: GridColumn,index: number): HTMLElement

Parameters:

Returns HTMLElement


renderFooter

▸ renderFooter(): void

Returns void


renderHeader

▸ renderHeader(): void

Returns void


renderPageInfoBlock

▸ renderPageInfoBlock(): HTMLDivElement

Returns HTMLDivElement


renderPageNavigator

▸ renderPageNavigator(): HTMLDivElement

Returns HTMLDivElement


renderRow

▸ renderRow(row: DataRow,index: number): HTMLDivElement

Parameters:

Returns HTMLDivElement


showProgress

▸ showProgress(): void

Returns void


updateHeight

▸ updateHeight(): Promise<void>

Returns Promise<void>