Skip to content

@serenity-is/sleekgrid / ISleekGrid

Interface: ISleekGrid<TItem>

Defined in: src/core/isleekgrid.ts:16

Full grid surface exposed to plugins, editors and external code.

Extends

Type Parameters

TItem

TItem = any

Row item type.

Properties

onActiveCellChanged

readonly onActiveCellChanged: EventEmitter<ArgsCell>

Defined in: src/core/isleekgrid.ts:18

Fired when the active cell changes. ArgsCell payload.


onActiveCellPositionChanged

readonly onActiveCellPositionChanged: EventEmitter<ArgsGrid>

Defined in: src/core/isleekgrid.ts:20

Fired when the active cell's pixel position changes (e.g. after scrolling). ArgsGrid payload.


onAddNewRow

readonly onAddNewRow: EventEmitter<ArgsAddNewRow>

Defined in: src/core/isleekgrid.ts:22

Fired when a new row is about to be added via the add-new-row row. ArgsAddNewRow payload.


onAfterInit

readonly onAfterInit: EventEmitter<ArgsGrid>

Defined in: src/core/isleekgrid.ts:24

Fired once after init() completes. ArgsGrid payload.


onBeforeCellEditorDestroy

readonly onBeforeCellEditorDestroy: EventEmitter<ArgsEditorDestroy>

Defined in: src/core/isleekgrid.ts:26

Fired before a cell editor is destroyed; allows handlers to intercept. ArgsEditorDestroy payload.


onBeforeDestroy

readonly onBeforeDestroy: EventEmitter<ArgsGrid>

Defined in: src/core/isleekgrid.ts:28

Fired before the grid is destroyed. ArgsGrid payload.


onBeforeEditCell

readonly onBeforeEditCell: EventEmitter<ArgsCellEdit>

Defined in: src/core/isleekgrid.ts:30

Fired before a cell enters edit mode; cancel with e.preventDefault(). ArgsCellEdit payload.


onBeforeFooterRowCellDestroy

readonly onBeforeFooterRowCellDestroy: EventEmitter<ArgsColumnNode>

Defined in: src/core/isleekgrid.ts:32

Fired before a footer row cell is destroyed. ArgsColumnNode payload.


onBeforeHeaderCellDestroy

readonly onBeforeHeaderCellDestroy: EventEmitter<ArgsColumnNode>

Defined in: src/core/isleekgrid.ts:34

Fired before a header cell is destroyed. ArgsColumnNode payload.


onBeforeHeaderRowCellDestroy

readonly onBeforeHeaderRowCellDestroy: EventEmitter<ArgsColumnNode>

Defined in: src/core/isleekgrid.ts:36

Fired before a header-row (filter) cell is destroyed. ArgsColumnNode payload.


onCellChange

readonly onCellChange: EventEmitter<ArgsCellChange>

Defined in: src/core/isleekgrid.ts:38

Fired after a cell value has changed and been committed. ArgsCellChange payload.


onCellCssStylesChanged

readonly onCellCssStylesChanged: EventEmitter<ArgsCssStyle>

Defined in: src/core/isleekgrid.ts:40

Fired when per-cell CSS styles change. ArgsCssStyle payload.


onClick

readonly onClick: EventEmitter<ArgsCell, MouseEvent>

Defined in: src/core/isleekgrid.ts:42

Click on a body cell. ArgsCell, native MouseEvent.


onColumnsReordered

readonly onColumnsReordered: EventEmitter<ArgsGrid>

Defined in: src/core/isleekgrid.ts:44

Fired after columns are reordered. ArgsGrid payload.


onColumnsResized

readonly onColumnsResized: EventEmitter<ArgsGrid>

Defined in: src/core/isleekgrid.ts:46

Fired after columns are resized. ArgsGrid payload.


onCompositeEditorChange

onCompositeEditorChange: EventEmitter<any>

Defined in: src/core/editing.ts:55

Emits when a composite-editor field value changes; editors forward changes through this.

Inherited from

EditorHost.onCompositeEditorChange


onContextMenu

readonly onContextMenu: EventEmitter<ArgsGrid, UIEvent>

Defined in: src/core/isleekgrid.ts:48

Context-menu event on the grid canvas. ArgsGrid, native UIEvent.


onDblClick

readonly onDblClick: EventEmitter<ArgsCell, MouseEvent>

Defined in: src/core/isleekgrid.ts:50

Double-click on a body cell. ArgsCell, native MouseEvent.


onDrag

readonly onDrag: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/core/isleekgrid.ts:52

Ongoing drag within the grid. ArgsDrag, native UIEvent.


onDragEnd

readonly onDragEnd: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/core/isleekgrid.ts:54

Drag finished. ArgsDrag, native UIEvent.


onDragInit

readonly onDragInit: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/core/isleekgrid.ts:56

Drag initialized (mousedown on a draggable surface). ArgsDrag, native UIEvent.


onDragStart

readonly onDragStart: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/core/isleekgrid.ts:58

Drag started (after minimum movement threshold). ArgsDrag, native UIEvent.


onFooterRowCellRendered

readonly onFooterRowCellRendered: EventEmitter<ArgsColumnNode>

Defined in: src/core/isleekgrid.ts:60

Fired after a footer row cell is rendered. ArgsColumnNode payload.


onHeaderCellRendered

readonly onHeaderCellRendered: EventEmitter<ArgsColumnNode>

Defined in: src/core/isleekgrid.ts:62

Fired after a header cell is rendered. ArgsColumnNode payload.


onHeaderClick

readonly onHeaderClick: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/core/isleekgrid.ts:64

Click on a header cell. ArgsColumn, native MouseEvent.


onHeaderContextMenu

readonly onHeaderContextMenu: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/core/isleekgrid.ts:66

Context menu on a header cell. ArgsColumn, native MouseEvent.


onHeaderMouseEnter

readonly onHeaderMouseEnter: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/core/isleekgrid.ts:68

Pointer entered a header cell. ArgsColumn, native MouseEvent.


onHeaderMouseLeave

readonly onHeaderMouseLeave: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/core/isleekgrid.ts:70

Pointer left a header cell. ArgsColumn, native MouseEvent.


onHeaderRowCellRendered

readonly onHeaderRowCellRendered: EventEmitter<ArgsColumnNode>

Defined in: src/core/isleekgrid.ts:72

Fired after a header-row (filter) cell is rendered. ArgsColumnNode payload.


onKeyDown

readonly onKeyDown: EventEmitter<ArgsCell, KeyboardEvent>

Defined in: src/core/isleekgrid.ts:74

Key down while a body cell is active. ArgsCell, native KeyboardEvent.


onMouseEnter

readonly onMouseEnter: EventEmitter<ArgsGrid, MouseEvent>

Defined in: src/core/isleekgrid.ts:76

Pointer entered the grid. ArgsGrid, native MouseEvent.


onMouseLeave

readonly onMouseLeave: EventEmitter<ArgsGrid, MouseEvent>

Defined in: src/core/isleekgrid.ts:78

Pointer left the grid. ArgsGrid, native MouseEvent.


onScroll

readonly onScroll: EventEmitter<ArgsScroll>

Defined in: src/core/isleekgrid.ts:80

Grid scrolled. ArgsScroll payload.


onSelectedRowsChanged

readonly onSelectedRowsChanged: EventEmitter<ArgsSelectedRowsChange>

Defined in: src/core/isleekgrid.ts:82

Selected rows changed. ArgsSelectedRowsChange payload.


onSort

readonly onSort: EventEmitter<ArgsSort>

Defined in: src/core/isleekgrid.ts:84

Sorted columns changed. ArgsSort payload.


onValidationError

readonly onValidationError: EventEmitter<ArgsValidationError>

Defined in: src/core/isleekgrid.ts:86

Editor validation failed. ArgsValidationError payload.


onViewportChanged

readonly onViewportChanged: EventEmitter<ArgsGrid>

Defined in: src/core/isleekgrid.ts:88

Visible viewport changed (scroll or resize). ArgsGrid payload.


render()

render: () => void

Defined in: src/core/isleekgrid.ts:399

Immediately renders the grid (row/cell DOM), synchronizing canvases and headers. Usually called internally via invalidate() + animation frame; call manually after batch updates.

Returns

void


resizeCanvas()

resizeCanvas: () => void

Defined in: src/core/isleekgrid.ts:412

Recalculates canvas/viewport sizes and re-renders headers and rows. Call after external container resize when autoHeight is off.

Returns

void

Methods

addCellCssStyles()

addCellCssStyles(key, hash): void

Defined in: src/core/isleekgrid.ts:99

Adds per-cell CSS styles under the given key; multiple callers can coexist via different keys.

Parameters

key

string

Bucket name to group styles so callers can later remove only their own styles.

hash

CellStylesHash

Map of row -> columnId -> cssClass.

Returns

void


autosizeColumns()

autosizeColumns(): void

Defined in: src/core/isleekgrid.ts:103

Auto-sizes columns to fit the container width, honouring minWidth/maxWidth and forceFitColumns.

Returns

void


cancelCurrentEdit()

cancelCurrentEdit(): boolean

Defined in: src/core/isleekgrid.ts:108

Cancels the current cell edit without saving.

Returns

boolean

true if cancelled (or no edit was active).


canCellBeActive()

canCellBeActive(row, cell, tab?): boolean

Defined in: src/core/isleekgrid.ts:116

Checks whether a cell can become the active cell (focusable and selectable).

Parameters

row

number

Row index.

cell

number

Cell/column index.

tab?

boolean

Whether the check is for tab navigation (affects tabbable handling).

Returns

boolean

true if the cell may become active.


canCellBeSelected()

canCellBeSelected(row, cell): boolean

Defined in: src/core/isleekgrid.ts:123

Checks whether a cell may be selected.

Parameters

row

number

Row index.

cell

number

Cell/column index.

Returns

boolean

true if the cell is selectable.


clearTextSelection()

clearTextSelection(): void

Defined in: src/core/isleekgrid.ts:125

Clears any browser text selection within the grid.

Returns

void


columnsResized()

columnsResized(invalidate?): void

Defined in: src/core/isleekgrid.ts:130

Notifies the grid that column sizes have changed externally.

Parameters

invalidate?

boolean

Whether to invalidate and re-render visible rows (default true behaviour).

Returns

void


commitCurrentEdit()

commitCurrentEdit(opt?): boolean

Defined in: src/core/isleekgrid.ts:136

Commits the current edit, running validation.

Parameters

opt?

Options; set { forceValueChange: true } to force onCellChange even when the value did not appear to change.

forceValueChange?

boolean

Returns

boolean

true if committed (or no edit was active), false if validation failed.


destroy()

destroy(): void

Defined in: src/core/isleekgrid.ts:138

Destroys the grid, removing DOM and event listeners.

Returns

void


editActiveCell()

editActiveCell(editor?): void

Defined in: src/core/isleekgrid.ts:143

Activates the editor on the currently active cell.

Parameters

editor?

EditorClass

Optional editor class override; defaults to the column's editor.

Returns

void


flashCell()

flashCell(row, cell, speed?): void

Defined in: src/core/isleekgrid.ts:150

Flashes a cell briefly for visual feedback (e.g. successful update).

Parameters

row

number

Row index.

cell

number

Cell/column index.

speed?

number

Flash duration in milliseconds; defaults to grid's configured speed.

Returns

void


focus()

focus(): void

Defined in: src/core/isleekgrid.ts:154

Focuses the grid's viewport so keyboard navigation works.

Returns

void


getAbsoluteColumnMinWidth()

getAbsoluteColumnMinWidth(): number

Defined in: src/core/isleekgrid.ts:156

Returns the minimum allowed column width, considering absolute minima.

Returns

number


getActiveCanvasNode()

getActiveCanvasNode(e?): HTMLElement

Defined in: src/core/isleekgrid.ts:161

Gets the scrollable canvas node that is active for the given event target.

Parameters

e?

Optional event target hint for viewport disambiguation.

target

EventTarget

Returns

HTMLElement


getActiveCell()

getActiveCell(): RowCell

Defined in: src/core/editing.ts:49

Returns the currently active cell, or null when no cell is active.

Returns

RowCell

Inherited from

EditorHost.getActiveCell


getActiveCellNode()

getActiveCellNode(): HTMLElement

Defined in: src/core/isleekgrid.ts:163

Gets the DOM node for the currently active cell, if any.

Returns

HTMLElement


getActiveViewportNode()

getActiveViewportNode(e?): HTMLElement

Defined in: src/core/isleekgrid.ts:168

Gets the viewport node that is active for the given event target.

Parameters

e?

Optional event target hint for viewport disambiguation.

target

EventTarget

Returns

HTMLElement


getAllColumns()

getAllColumns(): Column<TItem>[]

Defined in: src/core/isleekgrid.ts:170

Returns all columns in the grid, including hidden ones; order may differ from visible columns due to pinning/reordering.

Returns

Column<TItem>[]


getCanvases()

getCanvases(): any

Defined in: src/core/isleekgrid.ts:172

Returns the grid's canvas elements (one per viewport when frozen rows/cols are used).

Returns

any


getCanvasNode()

getCanvasNode(row?, cell?): HTMLElement

Defined in: src/core/isleekgrid.ts:178

Gets the canvas element for the given row/cell viewport.

Parameters

row?

number

Optional row hint for viewport selection.

cell?

number

Optional cell hint for viewport selection.

Returns

HTMLElement


getCellCssStyles()

getCellCssStyles(key): CellStylesHash

Defined in: src/core/isleekgrid.ts:184

Gets the cell CSS styles hash associated with the given key.

Parameters

key

string

Style bucket name.

Returns

CellStylesHash

Hash of row -> columnId -> cssClass.


getCellEditor()

getCellEditor(): Editor

Defined in: src/core/isleekgrid.ts:186

Returns the currently active editor instance, if any.

Returns

Editor


getCellFromEvent()

getCellFromEvent(e): object

Defined in: src/core/isleekgrid.ts:192

Resolves a row/cell coordinate from a mouse or keyboard event.

Parameters

e

any

Native event with target coordinates.

Returns

object

Row/cell indexes.

cell

cell: number

row

row: number


getCellFromNode()

getCellFromNode(cellNode): number

Defined in: src/core/isleekgrid.ts:197

Resolves the cell/column index from a cell DOM node.

Parameters

cellNode

Element

Cell element.

Returns

number


getCellFromPoint()

getCellFromPoint(x, y): object

Defined in: src/core/isleekgrid.ts:204

Resolves a row/cell from pixel coordinates relative to the canvas.

Parameters

x

number

Horizontal pixel offset.

y

number

Vertical pixel offset.

Returns

object

Row/cell indexes.

cell

cell: number

row

row: number


getCellNode()

getCellNode(row, cell): HTMLElement

Defined in: src/core/isleekgrid.ts:211

Gets the DOM node for a specific cell.

Parameters

row

number

Row index.

cell

number

Cell/column index.

Returns

HTMLElement

Cell element, or null when not rendered.


getCellNodeBox()

getCellNodeBox(row, cell): object

Defined in: src/core/isleekgrid.ts:218

Gets the bounding rectangle for a specific cell.

Parameters

row

number

Row index.

cell

number

Cell/column index.

Returns

object

Box with top, right, bottom, left in pixels.

bottom

bottom: number

left

left: number

right: number

top

top: number


getColspan()

getColspan(row, cell): number

Defined in: src/core/isleekgrid.ts:225

Gets the column span for the cell at the given row/col, taking colspan metadata into account.

Parameters

row

number

Row index.

cell

number

Cell/column index.

Returns

number

Number of columns spanned (at least 1).


getColumnById()

getColumnById(id): Column<TItem>

Defined in: src/core/isleekgrid.ts:231

Gets a column by its id; may return hidden columns.

Parameters

id

string

Column id.

Returns

Column<TItem>

Matching column definition or undefined.


getColumnFromNode()

getColumnFromNode(cellNode): Column<TItem>

Defined in: src/core/isleekgrid.ts:237

Resolves the column definition from a cell DOM node.

Parameters

cellNode

Element

Cell element.

Returns

Column<TItem>

Corresponding column definition.


getColumnIndex()

getColumnIndex(id, opt?): number

Defined in: src/core/isleekgrid.ts:244

Gets the index of a column by its id.

Parameters

id

string

Column id.

opt?

When opt.inAll is true, searches all columns; otherwise only visible columns.

inAll?

boolean

Returns

number

Column index or -1 when not found.


getColumns()

getColumns(): Column<TItem>[]

Defined in: src/core/isleekgrid.ts:246

Returns only the visible columns in display order.

Returns

Column<TItem>[]


getContainerNode()

getContainerNode(): HTMLElement

Defined in: src/core/isleekgrid.ts:248

Returns the root container element of the grid.

Returns

HTMLElement


getData()

getData(): any

Defined in: src/core/isleekgrid.ts:250

Returns the data source / DataView attached to the grid.

Returns

any


getDataItem()

getDataItem(row): TItem

Defined in: src/core/isleekgrid.ts:256

Returns the data item at the given view row.

Parameters

row

number

View row index.

Returns

TItem

Data item for that row (or Group/GroupTotals for group rows).


getDataItemValueForColumn()

getDataItemValueForColumn(item, columnDef): any

Defined in: src/core/isleekgrid.ts:263

Extracts the raw cell value for a given column and item.

Parameters

item

TItem

Row data item.

columnDef

Column<TItem>

Column definition.

Returns

any

Cell value.


getDataLength()

getDataLength(): number

Defined in: src/core/isleekgrid.ts:265

Returns the number of rows in the grid's data source/view.

Returns

number


getDisplayedScrollbarDimensions()

getDisplayedScrollbarDimensions(): object

Defined in: src/core/isleekgrid.ts:267

Returns the currently displayed scrollbar dimensions (accounts for auto-hiding etc.).

Returns

object

height

height: number

width

width: number


getEditController()

getEditController(): EditController

Defined in: src/core/isleekgrid.ts:269

Returns the edit controller that manages the active editor lock.

Returns

EditController


getEditorFactory()

getEditorFactory(): EditorFactory

Defined in: src/core/editing.ts:57

Resolves the editor factory for a given column/row.

Returns

EditorFactory

Inherited from

EditorHost.getEditorFactory


getEditorLock()

getEditorLock(): EditorLock

Defined in: src/core/isleekgrid.ts:271

Returns the EditorLock instance controlling concurrent edits.

Returns

EditorLock


getFooterRow()

getFooterRow(): HTMLElement

Defined in: src/core/isleekgrid.ts:273

Returns the footer row container element.

Returns

HTMLElement


getFooterRowColumn()

getFooterRowColumn(columnIdOrIdx): HTMLElement

Defined in: src/core/isleekgrid.ts:278

Returns the footer row cell element for the given column.

Parameters

columnIdOrIdx

Column id or visible index.

string | number

Returns

HTMLElement


getFormatter()

getFormatter(row, column): ColumnFormat<TItem>

Defined in: src/core/isleekgrid.ts:285

Resolves the formatter to use for a body cell, considering column, row metadata and factory.

Parameters

row

number

Row index.

column

Column<TItem>

Column definition.

Returns

ColumnFormat<TItem>

Formatter function for that cell.


getFormatterContext()

getFormatterContext(row, cell): FormatterContext

Defined in: src/core/isleekgrid.ts:292

Creates a formatter context for a body cell.

Parameters

row

number

Row index.

cell

number

Cell/column index.

Returns

FormatterContext

Populated FormatterContext.


getGridPosition()

getGridPosition(): Position

Defined in: src/core/isleekgrid.ts:294

Returns the grid container's bounding position (as used for editor placement).

Returns

Position


getGroupingPanel()

getGroupingPanel(): HTMLElement

Defined in: src/core/isleekgrid.ts:296

Returns the grouping panel container, if enabled.

Returns

HTMLElement


getHeader()

getHeader(): HTMLElement

Defined in: src/core/isleekgrid.ts:298

Returns the header row container element.

Returns

HTMLElement


getHeaderColumn()

getHeaderColumn(columnIdOrIdx): HTMLElement

Defined in: src/core/isleekgrid.ts:303

Returns the header cell element for the given column.

Parameters

columnIdOrIdx

Column id or visible index.

string | number

Returns

HTMLElement


getHeaderRow()

getHeaderRow(): HTMLElement

Defined in: src/core/isleekgrid.ts:305

Returns the header-row (filter row) container element.

Returns

HTMLElement


getHeaderRowColumn()

getHeaderRowColumn(columnIdOrIdx): HTMLElement

Defined in: src/core/isleekgrid.ts:310

Returns the header-row cell element for the given column.

Parameters

columnIdOrIdx

Column id or visible index.

string | number

Returns

HTMLElement


getLayoutInfo()

getLayoutInfo(): GridLayoutInfo

Defined in: src/core/isleekgrid.ts:312

Returns summarized layout/pinning information for the current grid configuration.

Returns

GridLayoutInfo


getOptions()

getOptions(): GridOptions<TItem>

Defined in: src/core/isleekgrid.ts:314

Returns the current grid options.

Returns

GridOptions<TItem>


getPluginByName()

getPluginByName(name): GridPlugin

Defined in: src/core/grid-plugin.ts:35

Retrieves a plugin by its GridPlugin.pluginName.

Parameters

name

string

Plugin name to look up.

Returns

GridPlugin

The plugin instance, or null/undefined when not found.

Inherited from

GridPluginHost.getPluginByName


getPreHeaderPanel()

getPreHeaderPanel(): HTMLElement

Defined in: src/core/isleekgrid.ts:316

Returns the pre-header panel element (grouping panel alternative).

Returns

HTMLElement


getRenderedRange()

getRenderedRange(viewportTop?, viewportLeft?): ViewRange

Defined in: src/core/isleekgrid.ts:322

Returns the currently rendered view range as managed by the render loop.

Parameters

viewportTop?

number

Optional scroll top override.

viewportLeft?

number

Optional scroll left override.

Returns

ViewRange


getRowFromNode()

getRowFromNode(rowNode): number

Defined in: src/core/isleekgrid.ts:327

Resolves the view row index from a row DOM node.

Parameters

rowNode

Element

Row element.

Returns

number


getScrollBarDimensions()

getScrollBarDimensions(): object

Defined in: src/core/isleekgrid.ts:329

Returns the native scrollbar width/height for the grid, measured from the layout.

Returns

object

height

height: number

width

width: number


getSelectedRows()

getSelectedRows(): number[]

Defined in: src/core/isleekgrid.ts:331

Returns the currently selected row indices.

Returns

number[]


getSelectionModel()

getSelectionModel(): SelectionModel

Defined in: src/core/isleekgrid.ts:333

Returns the active selection model plugin, if any.

Returns

SelectionModel


getSortColumns()

getSortColumns(): ColumnSort[]

Defined in: src/core/isleekgrid.ts:335

Returns the active sort column descriptors.

Returns

ColumnSort[]


getTopPanel()

getTopPanel(): HTMLElement

Defined in: src/core/isleekgrid.ts:337

Returns the top panel container element.

Returns

HTMLElement


getTotalsFormatter()

getTotalsFormatter(column): ColumnFormat<TItem>

Defined in: src/core/isleekgrid.ts:343

Resolves the group-totals formatter for a column.

Parameters

column

Column<TItem>

Column to resolve a totals formatter for.

Returns

ColumnFormat<TItem>

Formatter for that column's totals row.


getUID()

getUID(): string

Defined in: src/core/isleekgrid.ts:345

Returns the unique identifier assigned to this grid instance.

Returns

string


getViewport()

getViewport(viewportTop?, viewportLeft?): ViewRange

Defined in: src/core/isleekgrid.ts:351

Gets the viewport range for the active viewports.

Parameters

viewportTop?

number

Optional scroll top override.

viewportLeft?

number

Optional scroll left override.

Returns

ViewRange


getViewportNode()

getViewportNode(row?, cell?): HTMLElement

Defined in: src/core/isleekgrid.ts:357

Gets the viewport container node for the given row/cell.

Parameters

row?

number

Optional row hint for viewport selection.

cell?

number

Optional cell hint for viewport selection.

Returns

HTMLElement


getVisibleRange()

getVisibleRange(viewportTop?, viewportLeft?): ViewRange

Defined in: src/core/isleekgrid.ts:363

Gets the visible (fully within viewport) row/cell range.

Parameters

viewportTop?

number

Optional scroll top override.

viewportLeft?

number

Optional scroll left override.

Returns

ViewRange


gotoCell()

gotoCell(row, cell, forceEdit?): void

Defined in: src/core/isleekgrid.ts:370

Scrolls to and optionally edits the given cell.

Parameters

row

number

Row index to go to.

cell

number

Cell/column index to go to.

forceEdit?

boolean

Whether to immediately enter edit mode.

Returns

void


init()

init(): void

Defined in: src/core/isleekgrid.ts:93

Initializes the grid DOM, binds events and performs the first render. Called automatically on construction unless explicitInitialization is set.

Returns

void


invalidate()

invalidate(): void

Defined in: src/core/isleekgrid.ts:372

Invalidates the entire grid, requiring a full re-render on the next frame.

Returns

void


invalidateAllRows()

invalidateAllRows(): void

Defined in: src/core/isleekgrid.ts:374

Invalidates all rows, forcing them to be re-rendered.

Returns

void


invalidateColumns()

invalidateColumns(): void

Defined in: src/core/isleekgrid.ts:379

Invalidates header/column chrome after column properties change without a full setColumns() call (e.g. width, name, visible etc.). Forces header/footer re-rendering.

Returns

void


invalidateRow()

invalidateRow(row): void

Defined in: src/core/isleekgrid.ts:384

Invalidates a single row so it is re-rendered on the next frame.

Parameters

row

number

View row index to invalidate.

Returns

void


invalidateRows()

invalidateRows(rows): void

Defined in: src/core/isleekgrid.ts:389

Invalidates multiple rows so they are re-rendered on the next frame.

Parameters

rows

number[]

View row indices to invalidate.

Returns

void


navigate(dir): boolean

Defined in: src/core/cellnavigation.ts:95

Navigate the active cell in the specified direction.

Parameters

dir

CellNavigationDirection

Navigation direction.

Returns

boolean

Whether navigation resulted in a change of the active cell.

Inherited from

CellNavigation.navigate


navigateBottom(): void

Defined in: src/core/cellnavigation.ts:18

Moves the active cell to the last row of the data set.

Returns

void

Inherited from

CellNavigation.navigateBottom


navigateDown(): boolean

Defined in: src/core/cellnavigation.ts:24

Moves the active cell one row down.

Returns

boolean

true if the active cell changed, false if already at the bottom or blocked.

Inherited from

CellNavigation.navigateDown


navigateLeft(): boolean

Defined in: src/core/cellnavigation.ts:30

Moves the active cell one column to the left.

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigateLeft


navigateNext(): boolean

Defined in: src/core/cellnavigation.ts:36

Moves the active cell to the next focusable cell (row-major order, wrapping rows).

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigateNext


navigatePageDown(): void

Defined in: src/core/cellnavigation.ts:41

Scrolls one page down and moves the active cell accordingly.

Returns

void

Inherited from

CellNavigation.navigatePageDown


navigatePageUp(): void

Defined in: src/core/cellnavigation.ts:46

Scrolls one page up and moves the active cell accordingly.

Returns

void

Inherited from

CellNavigation.navigatePageUp


navigatePrev(): boolean

Defined in: src/core/cellnavigation.ts:52

Moves the active cell to the previous focusable cell (reverse row-major order).

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigatePrev


navigateRight(): boolean

Defined in: src/core/cellnavigation.ts:58

Moves the active cell one column to the right.

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigateRight


navigateRowEnd(): boolean

Defined in: src/core/cellnavigation.ts:64

Moves the active cell to the last cell of the current row.

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigateRowEnd


navigateRowStart(): boolean

Defined in: src/core/cellnavigation.ts:70

Moves the active cell to the first cell of the current row.

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigateRowStart


navigateTop(): void

Defined in: src/core/cellnavigation.ts:75

Moves the active cell to the first row of the data set.

Returns

void

Inherited from

CellNavigation.navigateTop


navigateToRow(row): boolean

Defined in: src/core/cellnavigation.ts:82

Moves the active cell to the specified row, keeping the current column if possible.

Parameters

row

number

Zero-based row index to navigate to.

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigateToRow


navigateUp(): boolean

Defined in: src/core/cellnavigation.ts:88

Moves the active cell one row up.

Returns

boolean

true if the active cell changed.

Inherited from

CellNavigation.navigateUp


registerPlugin()

registerPlugin(plugin): void

Defined in: src/core/grid-plugin.ts:40

Registers a plugin and calls its GridPlugin.init.

Parameters

plugin

GridPlugin

Plugin to register.

Returns

void

Inherited from

GridPluginHost.registerPlugin


removeCellCssStyles()

removeCellCssStyles(key): void

Defined in: src/core/isleekgrid.ts:394

Removes all cell CSS styles associated with the given key.

Parameters

key

string

Style bucket name.

Returns

void


reorderColumns()

reorderColumns(columnIds, opt?): void

Defined in: src/core/isleekgrid.ts:405

Reorders columns based on their ids and optionally updates visibility.

Parameters

columnIds

string[]

Ordered list of column ids to become the new visible order.

opt?

When opt.notify is false, suppresses onColumnsReordered; when opt.setVisible is provided, visible columns are set to that list.

notify?

boolean

setVisible?

string[]

Returns

void


resetActiveCell()

resetActiveCell(): void

Defined in: src/core/isleekgrid.ts:407

Clears the active cell without scrolling.

Returns

void


scrollActiveCellIntoView()

scrollActiveCellIntoView(): void

Defined in: src/core/isleekgrid.ts:414

Scrolls the viewport so the active cell is visible.

Returns

void


scrollCellIntoView()

scrollCellIntoView(row, cell, doPaging?): void

Defined in: src/core/isleekgrid.ts:421

Scrolls a specific cell into view.

Parameters

row

number

Row index.

cell

number

Cell/column index.

doPaging?

boolean

Whether to page the view when the row is far outside the viewport.

Returns

void


scrollColumnIntoView()

scrollColumnIntoView(cell): void

Defined in: src/core/isleekgrid.ts:426

Scrolls a column into view without changing the active row.

Parameters

cell

number

Visible column index to bring into view.

Returns

void


scrollRowIntoView()

scrollRowIntoView(row, doPaging?): void

Defined in: src/core/isleekgrid.ts:432

Scrolls a row into view.

Parameters

row

number

Row index.

doPaging?

boolean

Whether to page the view when the row is far outside the viewport.

Returns

void


scrollRowToTop()

scrollRowToTop(row): void

Defined in: src/core/isleekgrid.ts:437

Scrolls so that the given row is at the top of the viewport.

Parameters

row

number

Row index to position at the top.

Returns

void


setActiveCell()

setActiveCell(row, cell): void

Defined in: src/core/isleekgrid.ts:443

Sets the active cell, committing or cancelling any pending edit as needed.

Parameters

row

number

Row index to activate.

cell

number

Cell/column index to activate.

Returns

void


setActiveRow()

setActiveRow(row, cell, suppressScrollIntoView?): void

Defined in: src/core/isleekgrid.ts:450

Sets the active row, optionally suppressing the automatic scroll into view.

Parameters

row

number

Row index to become active.

cell

number

Cell/column index to become active.

suppressScrollIntoView?

boolean

When true, the grid does not scroll to show the cell.

Returns

void


setCellCssStyles()

setCellCssStyles(key, hash): void

Defined in: src/core/isleekgrid.ts:456

Sets per-cell CSS styles under the given key, replacing any previous styles for that key.

Parameters

key

string

Bucket name.

hash

CellStylesHash

Map of row -> columnId -> cssClass.

Returns

void


setColumnHeaderVisibility()

setColumnHeaderVisibility(visible): void

Defined in: src/core/isleekgrid.ts:461

Shows or hides the column header row.

Parameters

visible

boolean

true to show, false to hide.

Returns

void


setColumns()

setColumns(columns): void

Defined in: src/core/isleekgrid.ts:466

Replaces the column set and re-renders headers/rows.

Parameters

columns

Column<TItem>[]

New ordered list of column definitions.

Returns

void


setData()

setData(newData, scrollToTop?): void

Defined in: src/core/isleekgrid.ts:478

Replaces the data source and refreshes the view.

Parameters

newData

any

New data array or DataView-like object.

scrollToTop?

boolean

Whether to scroll to the top after the replacement.

Returns

void


setFooterRowVisibility()

setFooterRowVisibility(visible): void

Defined in: src/core/isleekgrid.ts:483

Shows or hides the footer row.

Parameters

visible

boolean

true to show, false to hide.

Returns

void


setGroupingPanelVisibility()

setGroupingPanelVisibility(visible): void

Defined in: src/core/isleekgrid.ts:488

Shows or hides the grouping panel.

Parameters

visible

boolean

true to show, false to hide.

Returns

void


setHeaderRowVisibility()

setHeaderRowVisibility(visible): void

Defined in: src/core/isleekgrid.ts:493

Shows or hides the header row (filter row).

Parameters

visible

boolean

true to show, false to hide.

Returns

void


setOptions()

setOptions(args, suppressRender?, suppressColumnSet?, suppressSetOverflow?): void

Defined in: src/core/isleekgrid.ts:501

Merges the given options into the current options and optionally re-renders.

Parameters

args

GridOptions<TItem>

Options to merge.

suppressRender?

boolean

When true, no render is triggered.

suppressColumnSet?

boolean

When true, columns are not re-set from args.columns.

suppressSetOverflow?

boolean

When true, the canvas overflow recalculation is skipped.

Returns

void


setPreHeaderPanelVisibility()

setPreHeaderPanelVisibility(visible): void

Defined in: src/core/isleekgrid.ts:506

Shows or hides the pre-header panel (deprecated grouping-panel variant).

Parameters

visible

boolean

true to show, false to hide.

Returns

void


setSelectedRows()

setSelectedRows(rows): void

Defined in: src/core/isleekgrid.ts:511

Selects the given rows (used by legacy row-selection integration).

Parameters

rows

number[]

Row indices to select.

Returns

void


setSelectionModel()

setSelectionModel(model): void

Defined in: src/core/isleekgrid.ts:516

Attaches a selection-model plugin.

Parameters

model

SelectionModel

Selection model to activate.

Returns

void


setSortColumn()

setSortColumn(columnId, ascending): void

Defined in: src/core/isleekgrid.ts:522

Sets single-column sort state.

Parameters

columnId

string

Column id to sort by.

ascending

boolean

true for ascending, false for descending.

Returns

void


setSortColumns()

setSortColumns(cols): void

Defined in: src/core/isleekgrid.ts:527

Sets multi-column sort state.

Parameters

cols

ColumnSort[]

Array of sort descriptors.

Returns

void


setTopPanelVisibility()

setTopPanelVisibility(visible): void

Defined in: src/core/isleekgrid.ts:532

Shows or hides the top panel.

Parameters

visible

boolean

true to show, false to hide.

Returns

void


setVisibleColumns()

setVisibleColumns(columnIds, opt?): void

Defined in: src/core/isleekgrid.ts:472

Sets the visible columns by id and optionally reorders them.

Parameters

columnIds

string[]

Ids of columns to make visible, in desired order.

opt?

When opt.reorder is false, current order is preserved; when opt.notify is false, onColumnsReordered is suppressed.

notify?

boolean

reorder?

boolean

Returns

void


unregisterPlugin()

unregisterPlugin(plugin): void

Defined in: src/core/grid-plugin.ts:45

Unregisters a plugin, calling GridPlugin.destroy if defined.

Parameters

plugin

GridPlugin

Plugin to remove.

Returns

void

Inherited from

GridPluginHost.unregisterPlugin


updateCell()

updateCell(row, cell): void

Defined in: src/core/isleekgrid.ts:538

Invalidates and re-renders a single cell.

Parameters

row

number

Row index.

cell

number

Cell/column index.

Returns

void


updateColumnHeader()

updateColumnHeader(columnId, title?, toolTip?): void

Defined in: src/core/isleekgrid.ts:545

Updates a header cell's title/tooltip in place without a full column reset.

Parameters

columnId

string

Column id whose header should be updated.

title?

New title text or header formatter.

string | ColumnFormat<any>

toolTip?

string

New tooltip text.

Returns

void


updatePagingStatusFromView()

updatePagingStatusFromView(pagingInfo): void

Defined in: src/core/isleekgrid.ts:550

Updates the grid's paging UI from a view/page change.

Parameters

pagingInfo

Paging descriptor with pageSize, pageNum and totalPages.

pageNum

number

pageSize

number

totalPages

number

Returns

void


updateRow()

updateRow(row): void

Defined in: src/core/isleekgrid.ts:555

Invalidates and re-renders an entire row.

Parameters

row

number

View row index to update.

Returns

void


updateRowCount()

updateRowCount(): void

Defined in: src/core/isleekgrid.ts:557

Recalculates row count after the data view changes and re-renders as needed.

Returns

void