Skip to content

@serenity-is/sleekgrid / SleekGrid

Class: SleekGrid<TItem>

Defined in: src/grid/sleekgrid.tsx:40

Main virtualized grid implementation. Handles viewport layout, column sizing, keyboard/cell navigation, editing, selection, and async post rendering. Implements ISleekGrid.

Type Parameters

TItem

TItem = any

Data item type.

Implements

Constructors

Constructor

new SleekGrid<TItem>(container, data, columns, options): SleekGrid<TItem>

Defined in: src/grid/sleekgrid.tsx:218

Constructs and initializes a new SleekGrid inside container. Auto-initializes unless explicitInitialization is set.

Parameters

container

Selector, element or jQuery/array-like container.

string | HTMLElement | ArrayLike<HTMLElement>

data

any

DataView or plain array of items.

columns

Column<TItem>[]

Initial column definitions.

options

GridOptions<TItem>

Grid options merged with gridDefaults.

Returns

SleekGrid<TItem>

Properties

onActiveCellChanged

readonly onActiveCellChanged: EventEmitter<ArgsCell>

Defined in: src/grid/sleekgrid.tsx:134

Fired when the active cell changes (ArgsCell).

Implementation of

ISleekGrid.onActiveCellChanged


onActiveCellPositionChanged

readonly onActiveCellPositionChanged: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:136

Fired when the active cell's box/position changes (scroll/ancestor scroll).

Implementation of

ISleekGrid.onActiveCellPositionChanged


onAddNewRow

readonly onAddNewRow: EventEmitter<ArgsAddNewRow>

Defined in: src/grid/sleekgrid.tsx:138

Fired when the Add-New row attempts to create a new item.

Implementation of

ISleekGrid.onAddNewRow


onAfterInit

readonly onAfterInit: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:142

Fired after SleekGrid.init completes for this instance.

Implementation of

ISleekGrid.onAfterInit


onBeforeCellEditorDestroy

readonly onBeforeCellEditorDestroy: EventEmitter<ArgsEditorDestroy>

Defined in: src/grid/sleekgrid.tsx:144

Before a cell editor is destroyed (allows intercept).

Implementation of

ISleekGrid.onBeforeCellEditorDestroy


onBeforeDestroy

readonly onBeforeDestroy: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:146

Before the grid is destroyed.

Implementation of

ISleekGrid.onBeforeDestroy


onBeforeEditCell

readonly onBeforeEditCell: EventEmitter<ArgsCellEdit>

Defined in: src/grid/sleekgrid.tsx:148

Cancelable; before a cell becomes editable.

Implementation of

ISleekGrid.onBeforeEditCell


onBeforeFooterRowCellDestroy

readonly onBeforeFooterRowCellDestroy: EventEmitter<ArgsColumnNode>

Defined in: src/grid/sleekgrid.tsx:150

Before a footer-row column node is removed.

Implementation of

ISleekGrid.onBeforeFooterRowCellDestroy


onBeforeHeaderCellDestroy

readonly onBeforeHeaderCellDestroy: EventEmitter<ArgsColumnNode>

Defined in: src/grid/sleekgrid.tsx:152

Before a header column node is removed.

Implementation of

ISleekGrid.onBeforeHeaderCellDestroy


onBeforeHeaderRowCellDestroy

readonly onBeforeHeaderRowCellDestroy: EventEmitter<ArgsColumnNode>

Defined in: src/grid/sleekgrid.tsx:154

Before a header-row column node is removed.

Implementation of

ISleekGrid.onBeforeHeaderRowCellDestroy


onCellChange

readonly onCellChange: EventEmitter<ArgsCellChange>

Defined in: src/grid/sleekgrid.tsx:156

After an editor commits a cell change.

Implementation of

ISleekGrid.onCellChange


onCellCssStylesChanged

readonly onCellCssStylesChanged: EventEmitter<ArgsCssStyle>

Defined in: src/grid/sleekgrid.tsx:158

After setCellCssStyles/addCellCssStyles/removeCellCssStyles.

Implementation of

ISleekGrid.onCellCssStylesChanged


onClick

readonly onClick: EventEmitter<ArgsCell, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:160

Click on a cell's canvas.

Implementation of

ISleekGrid.onClick


onColumnsReordered

readonly onColumnsReordered: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:162

After columns are reordered (drag or API).

Implementation of

ISleekGrid.onColumnsReordered


onColumnsResized

readonly onColumnsResized: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:164

After columns are resized.

Implementation of

ISleekGrid.onColumnsResized


onCompositeEditorChange

readonly onCompositeEditorChange: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:166

Forwarded by editors in composite-edit mode when a field value changes.

Implementation of

ISleekGrid.onCompositeEditorChange


onContextMenu

readonly onContextMenu: EventEmitter<ArgsGrid, UIEvent>

Defined in: src/grid/sleekgrid.tsx:168

Context menu on the grid canvas (opportunity to suppress/override).

Implementation of

ISleekGrid.onContextMenu


onDblClick

readonly onDblClick: EventEmitter<ArgsCell, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:170

Double-click on a cell.

Implementation of

ISleekGrid.onDblClick


onDrag

readonly onDrag: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/grid/sleekgrid.tsx:172

Ongoing drag (after threshold).

Implementation of

ISleekGrid.onDrag


onDragEnd

readonly onDragEnd: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/grid/sleekgrid.tsx:174

End of drag lifecycle.

Implementation of

ISleekGrid.onDragEnd


onDragInit

readonly onDragInit: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/grid/sleekgrid.tsx:176

Initial drag attempt (cancelable via stopImmediatePropagation).

Implementation of

ISleekGrid.onDragInit


onDragStart

readonly onDragStart: EventEmitter<ArgsDrag, UIEvent>

Defined in: src/grid/sleekgrid.tsx:178

When drag start threshold is passed.

Implementation of

ISleekGrid.onDragStart


onFooterRowCellRendered

readonly onFooterRowCellRendered: EventEmitter<ArgsColumnNode>

Defined in: src/grid/sleekgrid.tsx:180

After a footer-row cell is created.

Implementation of

ISleekGrid.onFooterRowCellRendered


onHeaderCellRendered

readonly onHeaderCellRendered: EventEmitter<ArgsColumnNode>

Defined in: src/grid/sleekgrid.tsx:182

After a header cell is created.

Implementation of

ISleekGrid.onHeaderCellRendered


onHeaderClick

readonly onHeaderClick: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:184

Click on a header column.

Implementation of

ISleekGrid.onHeaderClick


onHeaderContextMenu

readonly onHeaderContextMenu: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:186

Context menu on a header column.

Implementation of

ISleekGrid.onHeaderContextMenu


onHeaderMouseEnter

readonly onHeaderMouseEnter: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:188

Mouse entered a header column.

Implementation of

ISleekGrid.onHeaderMouseEnter


onHeaderMouseLeave

readonly onHeaderMouseLeave: EventEmitter<ArgsColumn, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:190

Mouse left a header column.

Implementation of

ISleekGrid.onHeaderMouseLeave


onHeaderRowCellRendered

readonly onHeaderRowCellRendered: EventEmitter<ArgsColumnNode>

Defined in: src/grid/sleekgrid.tsx:192

After a header-row (filter) cell is created.

Implementation of

ISleekGrid.onHeaderRowCellRendered


onKeyDown

readonly onKeyDown: EventEmitter<ArgsCell, KeyboardEvent>

Defined in: src/grid/sleekgrid.tsx:194

Keydown forwarded from focus sinks/canvases.

Implementation of

ISleekGrid.onKeyDown


onMouseEnter

readonly onMouseEnter: EventEmitter<ArgsGrid, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:196

Mouse entered a cell's canvas target.

Implementation of

ISleekGrid.onMouseEnter


onMouseLeave

readonly onMouseLeave: EventEmitter<ArgsGrid, MouseEvent>

Defined in: src/grid/sleekgrid.tsx:198

Mouse left a cell (entering the canvas background).

Implementation of

ISleekGrid.onMouseLeave


onScroll

readonly onScroll: EventEmitter<ArgsScroll>

Defined in: src/grid/sleekgrid.tsx:200

Raw scroll offsets after handleScroll (viewport and H-sync applied).

Implementation of

ISleekGrid.onScroll


onSelectedRowsChanged

readonly onSelectedRowsChanged: EventEmitter<ArgsSelectedRowsChange>

Defined in: src/grid/sleekgrid.tsx:202

After the selected-rows set changes (via selection model).

Implementation of

ISleekGrid.onSelectedRowsChanged


onSort

readonly onSort: EventEmitter<ArgsSort>

Defined in: src/grid/sleekgrid.tsx:204

After header-driven sort toggling (single or multi).

Implementation of

ISleekGrid.onSort


onValidationError

readonly onValidationError: EventEmitter<ArgsValidationError>

Defined in: src/grid/sleekgrid.tsx:206

When commitCurrentEdit() fails validation.

Implementation of

ISleekGrid.onValidationError


onViewportChanged

readonly onViewportChanged: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:208

After the viewport is re-rendered following a scroll.

Implementation of

ISleekGrid.onViewportChanged


onAfterInit

readonly static onAfterInit: EventEmitter<ArgsGrid>

Defined in: src/grid/sleekgrid.tsx:140

Static emitter also fired after any grid is initialized.

Methods

addCellCssStyles()

addCellCssStyles(key, hash): void

Defined in: src/grid/sleekgrid.tsx:3218

Adds a per-cell CSS hash under key and applies it to rendered rows.

Parameters

key

string

Namespace key.

hash

CellStylesHash

Hash of row -> columnId -> cssClass.

Returns

void

Implementation of

ISleekGrid.addCellCssStyles


autosizeColumns()

autosizeColumns(): void

Defined in: src/grid/sleekgrid.tsx:1391

Auto-fits resizable column widths to the available viewport width.

Returns

void

Implementation of

ISleekGrid.autosizeColumns


cancelCurrentEdit()

cancelCurrentEdit(): boolean

Defined in: src/grid/sleekgrid.tsx:4559

Cancels the active editor (if any) by delegating to makeActiveCellNormal().

Returns

boolean

Always true.

Implementation of

ISleekGrid.cancelCurrentEdit


canCellBeActive()

canCellBeActive(row, cell, tab?): boolean

Defined in: src/grid/sleekgrid.tsx:4367

Checks whether row/cell may become the active (focusable) cell. Consults row/column metadata and focusable flags.

Parameters

row

number

Row index.

cell

number

Cell index.

tab?

boolean

When true, additionally checks tabbable.

Returns

boolean

Implementation of

ISleekGrid.canCellBeActive


canCellBeSelected()

canCellBeSelected(row, cell): boolean

Defined in: src/grid/sleekgrid.tsx:4419

Checks whether row/cell is selectable (from row/column metadata selectable).

Parameters

row

number

Row index.

cell

number

Cell index.

Returns

boolean

Implementation of

ISleekGrid.canCellBeSelected


clearTextSelection()

clearTextSelection(): void

Defined in: src/grid/sleekgrid.tsx:3806

Clears any active text selection, handling IE selection when present.

Returns

void

Implementation of

ISleekGrid.clearTextSelection


columnsResized()

columnsResized(invalidate): void

Defined in: src/grid/sleekgrid.tsx:1204

Notifies the grid that column widths changed externally; updates limits, re-applies column widths and re-renders as needed.

Parameters

invalidate

boolean = true

When true, invalidates and re-renders visible rows.

Returns

void

Implementation of

ISleekGrid.columnsResized


commitCurrentEdit()

commitCurrentEdit(opt?): boolean

Defined in: src/grid/sleekgrid.tsx:4476

Commits the active editor value (if any), running validation and either executing an EditCommand via editCommandHandler or directly.

Parameters

opt?
forceValueChange?

boolean

When true, treats unchanged values as changed.

Returns

boolean

true when the commit succeeds (or no edit was active).

Implementation of

ISleekGrid.commitCurrentEdit


destroy()

destroy(): void

Defined in: src/grid/sleekgrid.tsx:1285

Tears down the grid, unbinding events, destroying plugins and removing DOM. Clears all on* emitters and instance-owned properties.

Returns

void

Implementation of

ISleekGrid.destroy


editActiveCell()

editActiveCell(editor?): void

Defined in: src/grid/sleekgrid.tsx:3867

Forces the active cell into edit mode (or keeps it active) using editor when provided.

Parameters

editor?

EditorClass

Optional editor class override.

Returns

void

Implementation of

ISleekGrid.editActiveCell


flashCell()

flashCell(row, cell, speed?): void

Defined in: src/grid/sleekgrid.tsx:3272

Briefly toggles the cellFlashingCssClass on row/cell for animation.

Parameters

row

number

View row index.

cell

number

Cell/column index.

speed?

number

Millisecond interval between toggles.

Returns

void

Implementation of

ISleekGrid.flashCell


focus()

focus(): void

Defined in: src/grid/sleekgrid.tsx:3696

Focuses the active focus sink so subsequent keystrokes reach the grid.

Returns

void

Implementation of

ISleekGrid.focus


getAbsoluteColumnMinWidth()

getAbsoluteColumnMinWidth(): number

Defined in: src/grid/sleekgrid.tsx:584

Returns the absolute minimum column width derived from header/cell box sizing.

Returns

number

Implementation of

ISleekGrid.getAbsoluteColumnMinWidth


getActiveCanvasNode()

getActiveCanvasNode(e?): HTMLElement

Defined in: src/grid/sleekgrid.tsx:657

Returns the canvas that last received focus/interaction, optionally resolving from an event for plugin compatibility.

Parameters

e?

Optional event whose target is used to resolve the canvas.

target

EventTarget

Returns

HTMLElement

Implementation of

ISleekGrid.getActiveCanvasNode


getActiveCell()

getActiveCell(): RowCell

Defined in: src/grid/sleekgrid.tsx:4000

Returns the active row/cell, or null when none is active.

Returns

RowCell

Implementation of

ISleekGrid.getActiveCell


getActiveCellNode()

getActiveCellNode(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:4011

Returns the DOM node for the active cell, or null.

Returns

HTMLElement

Implementation of

ISleekGrid.getActiveCellNode


getActiveViewportNode()

getActiveViewportNode(e?): HTMLElement

Defined in: src/grid/sleekgrid.tsx:685

Returns the active viewport, optionally resolving from an event for plugin compat.

Parameters

e?

Optional event whose target is used to resolve the viewport.

target

EventTarget

Returns

HTMLElement

Implementation of

ISleekGrid.getActiveViewportNode


getAllColumns()

getAllColumns(): Column<TItem>[]

Defined in: src/grid/sleekgrid.tsx:1533

Returns all columns including hidden ones (in setColumns order).

Returns

Column<TItem>[]

Implementation of

ISleekGrid.getAllColumns


getCanvases()

getCanvases(): any

Defined in: src/grid/sleekgrid.tsx:647

Returns all rendered canvases across bands/panes (jQuery-wrapped when available).

Returns

any

Implementation of

ISleekGrid.getCanvases


getCanvasNode()

getCanvasNode(row?, cell?): HTMLElement

Defined in: src/grid/sleekgrid.tsx:631

Returns the canvas element for the band/pane that owns row/cell.

Parameters

row?

number

Optional view row hint for frozen-pane disambiguation.

cell?

number

Optional cell hint for pinned-band disambiguation.

Returns

HTMLElement

Implementation of

ISleekGrid.getCanvasNode


getCellCssStyles()

getCellCssStyles(key): CellStylesHash

Defined in: src/grid/sleekgrid.tsx:3262

Returns the hash for key as stored by setCellCssStyles/addCellCssStyles.

Parameters

key

string

Namespace key.

Returns

CellStylesHash

Implementation of

ISleekGrid.getCellCssStyles


getCellEditor()

getCellEditor(): Editor

Defined in: src/grid/sleekgrid.tsx:3993

Returns the currently active editor, if any.

Returns

Editor

Implementation of

ISleekGrid.getCellEditor


getCellFromEvent()

getCellFromEvent(e): object

Defined in: src/grid/sleekgrid.tsx:3628

Resolves row/cell for an event targeting a cell.

Parameters

e

any

DOM event whose target lies inside the desired cell.

Returns

object

cell

cell: number

row

row: number

Implementation of

ISleekGrid.getCellFromEvent


getCellFromNode()

getCellFromNode(cellNode): number

Defined in: src/grid/sleekgrid.tsx:3575

Reads the column index from a cell's data-c or legacy .l# class.

Parameters

cellNode

Element

Cell element.

Returns

number

Implementation of

ISleekGrid.getCellFromNode


getCellFromPoint()

getCellFromPoint(x, y): object

Defined in: src/grid/sleekgrid.tsx:3554

Resolves a row/cell for the given content-space point.

Parameters

x

number

Horizontal pixel offset from the canvas origin.

y

number

Vertical pixel offset.

Returns

object

cell

cell: number

row

row: number

Implementation of

ISleekGrid.getCellFromPoint


getCellNode()

getCellNode(row, cell): HTMLElement

Defined in: src/grid/sleekgrid.tsx:4314

Returns the cell DOM node for row/cell if rendered (rowsCache hit).

Parameters

row

number

View row index.

cell

number

Cell index.

Returns

HTMLElement

Implementation of

ISleekGrid.getCellNode


getCellNodeBox()

getCellNodeBox(row, cell): object

Defined in: src/grid/sleekgrid.tsx:3653

Returns the pixel bounds of a cell's box in canvas coordinates.

Parameters

row

number

Row index.

cell

number

Cell index.

Returns

object

bottom

bottom: number

left

left: number

right: number

top

top: number

Implementation of

ISleekGrid.getCellNodeBox


getColspan()

getColspan(row, cell): number

Defined in: src/grid/sleekgrid.tsx:4170

Returns column span for row/cell via row metadata (colspan), or 1.

Parameters

row

number

View row index.

cell

number

Cell index.

Returns

number

Implementation of

ISleekGrid.getColspan


getColumnById()

getColumnById(id): Column<TItem>

Defined in: src/grid/sleekgrid.tsx:1374

Finds a column by its id including hidden columns.

Parameters

id

string

Column id.

Returns

Column<TItem>

Matching column or null.

Implementation of

ISleekGrid.getColumnById


getColumnFromNode()

getColumnFromNode(cellNode): Column<TItem>

Defined in: src/grid/sleekgrid.tsx:3595

Resolves the column definition from a cell's node.

Parameters

cellNode

Element

Cell element.

Returns

Column<TItem>

Implementation of

ISleekGrid.getColumnFromNode


getColumnIndex()

getColumnIndex(id, opt?): number

Defined in: src/grid/sleekgrid.tsx:1384

Returns the column index for id.

Parameters

id

string

Column id.

opt?
inAll?

boolean

When true, searches all columns; otherwise visible columns.

Returns

number

Column index or null when not found.

Implementation of

ISleekGrid.getColumnIndex


getColumns()

getColumns(): Column<TItem>[]

Defined in: src/grid/sleekgrid.tsx:1540

Returns only the currently visible columns in display order.

Returns

Column<TItem>[]

Implementation of

ISleekGrid.getColumns


getContainerNode()

getContainerNode(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:1958

Returns the grid's container element.

Returns

HTMLElement

Implementation of

ISleekGrid.getContainerNode


getData()

getData(): any

Defined in: src/grid/sleekgrid.tsx:1851

Returns the current data source (DataView or array).

Returns

any

Implementation of

ISleekGrid.getData


getDataItem()

getDataItem(row): TItem

Defined in: src/grid/sleekgrid.tsx:1875

Returns the data item for a view row (group/totals rows may be Group/IGroupTotals).

Parameters

row

number

View row index.

Returns

TItem

Implementation of

ISleekGrid.getDataItem


getDataItemValueForColumn()

getDataItemValueForColumn(item, columnDef): any

Defined in: src/grid/sleekgrid.tsx:2135

Extracts the raw cell value for columnDef from item (or via dataItemColumnValueExtractor when configured).

Parameters

item

TItem

Row data item.

columnDef

Column<TItem>

Column definition.

Returns

any

Implementation of

ISleekGrid.getDataItemValueForColumn


getDataLength()

getDataLength(): number

Defined in: src/grid/sleekgrid.tsx:1858

Returns view length (via getLength() when a DataView is attached).

Returns

number

Implementation of

ISleekGrid.getDataLength


getDisplayedScrollbarDimensions()

getDisplayedScrollbarDimensions(): object

Defined in: src/grid/sleekgrid.tsx:574

Returns the currently displayed (reserved) scrollbar space, accounting for auto/hidden scrollbars.

Returns

object

Object with width and height of displayed scrollbar area.

height

height: number

width

width: number

Implementation of

ISleekGrid.getDisplayedScrollbarDimensions


getEditController()

getEditController(): EditController

Defined in: src/grid/sleekgrid.tsx:1365

Returns the grid's internal EditController (commit/cancel) bound to this instance.

Returns

EditController

Implementation of

ISleekGrid.getEditController


getEditorFactory()

getEditorFactory(): EditorFactory

Defined in: src/grid/sleekgrid.tsx:1351

Returns the editorFactory from current grid options.

Returns

EditorFactory

Implementation of

ISleekGrid.getEditorFactory


getEditorLock()

getEditorLock(): EditorLock

Defined in: src/grid/sleekgrid.tsx:1358

Returns the current EditorLock controlling concurrent edits.

Returns

EditorLock

Implementation of

ISleekGrid.getEditorLock


getFooterRow()

getFooterRow(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:933

Returns the footer-row container for the main band.

Returns

HTMLElement

Implementation of

ISleekGrid.getFooterRow


getFooterRowColumn()

getFooterRowColumn(cell): HTMLElement

Defined in: src/grid/sleekgrid.tsx:941

Returns the footer-row cell node for cell.

Parameters

cell

Visible column index or column id.

string | number

Returns

HTMLElement

Implementation of

ISleekGrid.getFooterRowColumn


getFormatter()

getFormatter(row, column): ColumnFormat<TItem>

Defined in: src/grid/sleekgrid.tsx:2022

Resolves the formatter for a cell, accounting for row/column metadata, formatterFactory and fallbacks (defaultFormat/defaultFormatter).

Parameters

row

number

View row index.

column

Column<TItem>

Column definition.

Returns

ColumnFormat<TItem>

Implementation of

ISleekGrid.getFormatter


getFormatterContext()

getFormatterContext(row, cell): FormatterContext

Defined in: src/grid/sleekgrid.tsx:2080

Creates a FormatterContext for the given row/cell.

Parameters

row

number

View row index.

cell

number

Cell/column index.

Returns

FormatterContext

Implementation of

ISleekGrid.getFormatterContext


getGridPosition()

getGridPosition(): Position

Defined in: src/grid/sleekgrid.tsx:3963

Returns the absolute box of the grid container (for editor positioning).

Returns

Position

Implementation of

ISleekGrid.getGridPosition


getGroupingPanel()

getGroupingPanel(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:897

Returns the grouping panel container, if created.

Returns

HTMLElement

Implementation of

ISleekGrid.getGroupingPanel


getHeader()

getHeader(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:875

Returns the header column container for the main band.

Returns

HTMLElement

Implementation of

ISleekGrid.getHeader


getHeaderColumn()

getHeaderColumn(cell): HTMLElement

Defined in: src/grid/sleekgrid.tsx:883

Returns the header cell node for cell (id or visible index).

Parameters

cell

Visible column index or column id.

string | number

Returns

HTMLElement

Implementation of

ISleekGrid.getHeaderColumn


getHeaderRow()

getHeaderRow(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:911

Returns the header-row (filter row) container for the main band.

Returns

HTMLElement

Implementation of

ISleekGrid.getHeaderRow


getHeaderRowColumn()

getHeaderRowColumn(cell): HTMLElement

Defined in: src/grid/sleekgrid.tsx:919

Returns the header-row cell node for cell.

Parameters

cell

Visible column index or column id.

string | number

Returns

HTMLElement

Implementation of

ISleekGrid.getHeaderRowColumn


getLayoutInfo()

getLayoutInfo(): GridLayoutInfo

Defined in: src/grid/sleekgrid.tsx:611

Returns summarized layout support/indices for the current layout engine.

Returns

GridLayoutInfo

GridLayoutInfo with frozen/pinned counters and capability flags.

Implementation of

ISleekGrid.getLayoutInfo


getOptions()

getOptions(): GridOptions<TItem>

Defined in: src/grid/sleekgrid.tsx:1723

Returns current merged grid options.

Returns

GridOptions<TItem>

Implementation of

ISleekGrid.getOptions


getPluginByName()

getPluginByName(name): GridPlugin

Defined in: src/grid/sleekgrid.tsx:532

Looks up a registered plugin by its pluginName.

Parameters

name

string

Plugin name.

Returns

GridPlugin

Matching plugin or undefined.

Implementation of

ISleekGrid.getPluginByName


getPreHeaderPanel()

getPreHeaderPanel(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:904

Returns the (legacy) pre-header panel node inside the grouping panel.

Returns

HTMLElement

Implementation of

ISleekGrid.getPreHeaderPanel


getRenderedRange()

getRenderedRange(viewportTop?, viewportLeft?): ViewRange

Defined in: src/grid/sleekgrid.tsx:2547

Returns the rendered range including buffers (expanded beyond the viewport).

Parameters

viewportTop?

number

Optional scroll top override.

viewportLeft?

number

Optional scroll left override.

Returns

ViewRange

Implementation of

ISleekGrid.getRenderedRange


getRowFromNode()

getRowFromNode(rowNode): number

Defined in: src/grid/sleekgrid.tsx:3610

Resolves the view row index from a row node (data-row or cache).

Parameters

rowNode

Element

Row element.

Returns

number

Implementation of

ISleekGrid.getRowFromNode


getScrollBarDimensions()

getScrollBarDimensions(): object

Defined in: src/grid/sleekgrid.tsx:565

Returns native scrollbar thickness for the current environment.

Returns

object

Object with width and height in pixels.

height

height: number

width

width: number

Implementation of

ISleekGrid.getScrollBarDimensions


getScrollContainerX()

getScrollContainerX(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:2399

Returns the horizontal scroll container (main body viewport).

Returns

HTMLElement


getScrollContainerY()

getScrollContainerY(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:2406

Returns the vertical scroll container (main body viewport).

Returns

HTMLElement


getSelectedRows()

getSelectedRows(): number[]

Defined in: src/grid/sleekgrid.tsx:4577

Returns selected view rows (delegates to the attached selection model).

Returns

number[]

Throws

When no selection model is attached.

Implementation of

ISleekGrid.getSelectedRows


getSelectionModel()

getSelectionModel(): SelectionModel

Defined in: src/grid/sleekgrid.tsx:592

Returns the currently attached selection model, if any.

Returns

SelectionModel

The active SelectionModel.

Implementation of

ISleekGrid.getSelectionModel


getSortColumns()

getSortColumns(): ColumnSort[]

Defined in: src/grid/sleekgrid.tsx:1469

Returns the active sort descriptors.

Returns

ColumnSort[]

Implementation of

ISleekGrid.getSortColumns


getTopPanel()

getTopPanel(): HTMLElement

Defined in: src/grid/sleekgrid.tsx:1886

Returns the top panel container element.

Returns

HTMLElement

Implementation of

ISleekGrid.getTopPanel


getTotalsFormatter()

getTotalsFormatter(column): ColumnFormat<TItem>

Defined in: src/grid/sleekgrid.tsx:2097

Resolves the group-totals formatter for a column (or its totals variant).

Parameters

column

Column<TItem>

Column whose totals representation is needed.

Returns

ColumnFormat<TItem>

Implementation of

ISleekGrid.getTotalsFormatter


getUID()

getUID(): string

Defined in: src/grid/sleekgrid.tsx:1965

Returns the unique CSS-namespace UID for this grid instance.

Returns

string

Implementation of

ISleekGrid.getUID


getViewport()

getViewport(viewportTop?, viewportLeft?): ViewRange

Defined in: src/grid/sleekgrid.tsx:2515

Returns the current visible viewport range.

Parameters

viewportTop?

number

Optional scroll top override.

viewportLeft?

number

Optional scroll left override.

Returns

ViewRange

Implementation of

ISleekGrid.getViewport


getViewportNode()

getViewportNode(row?, cell?): HTMLElement

Defined in: src/grid/sleekgrid.tsx:669

Returns the viewport that owns row/cell (the canvas's parent).

Parameters

row?

number

Optional row hint.

cell?

number

Optional cell hint.

Returns

HTMLElement

Implementation of

ISleekGrid.getViewportNode


getVisibleRange()

getVisibleRange(viewportTop?, viewportLeft?): ViewRange

Defined in: src/grid/sleekgrid.tsx:2524

Returns the visible (clipped to viewport) range.

Parameters

viewportTop?

number

Optional scroll top override.

viewportLeft?

number

Optional scroll left override.

Returns

ViewRange

Implementation of

ISleekGrid.getVisibleRange


gotoCell()

gotoCell(row, cell, forceEdit?): void

Defined in: src/grid/sleekgrid.tsx:4444

Navigates to row/cell, optionally forcing edit mode.

Parameters

row

number

Target row.

cell

number

Target cell.

forceEdit?

boolean

When true, forces editor activation.

Returns

void

Implementation of

ISleekGrid.gotoCell


init()

init(): void

Defined in: src/grid/sleekgrid.tsx:384

Performs one-time DOM and event binding after construction. No-ops if already initialized. Computes sizes, creates headers/footers and binds scroll/keyboard/mouse handlers.

Returns

void

Implementation of

ISleekGrid.init


invalidate()

invalidate(): void

Defined in: src/grid/sleekgrid.tsx:2156

Invalidates and re-renders the entire grid (rows and totals).

Returns

void

Implementation of

ISleekGrid.invalidate


invalidateAllRows()

invalidateAllRows(): void

Defined in: src/grid/sleekgrid.tsx:2166

Invalidates all cached rows, forcing a full re-render of visible rows.

Returns

void

Implementation of

ISleekGrid.invalidateAllRows


invalidateColumns()

invalidateColumns(): void

Defined in: src/grid/sleekgrid.tsx:1699

Invalidates column chrome and virtualization state after column changes. Recomputes pinning, re-creates headers/footers, rebuilds CSS rules and re-renders.

Returns

void

Implementation of

ISleekGrid.invalidateColumns


invalidateRow()

invalidateRow(row): void

Defined in: src/grid/sleekgrid.tsx:2263

Invalidates a single view row.

Parameters

row

number

View row index.

Returns

void

Implementation of

ISleekGrid.invalidateRow


invalidateRows()

invalidateRows(rows): void

Defined in: src/grid/sleekgrid.tsx:2241

Invalidates specific view rows so they are re-rendered.

Parameters

rows

number[]

View row indices to invalidate.

Returns

void

Implementation of

ISleekGrid.invalidateRows


navigate(dir): boolean

Defined in: src/grid/sleekgrid.tsx:4260

Generic navigation dispatcher used by the key handler.

Parameters

dir

string

Direction ("up", "down", "left", "right", "next", "prev", "home", "end").

Returns

boolean

Implementation of

ISleekGrid.navigate


navigateBottom(): void

Defined in: src/grid/sleekgrid.tsx:4123

Navigates to the last data row.

Returns

void

Implementation of

ISleekGrid.navigateBottom


navigateDown(): boolean

Defined in: src/grid/sleekgrid.tsx:4205

Navigates one row downward.

Returns

boolean

Implementation of

ISleekGrid.navigateDown


navigateLeft(): boolean

Defined in: src/grid/sleekgrid.tsx:4198

Navigates one cell to the left.

Returns

boolean

Implementation of

ISleekGrid.navigateLeft


navigateNext(): boolean

Defined in: src/grid/sleekgrid.tsx:4219

Navigates to the next tabbable cell (including next row wrap).

Returns

boolean

Implementation of

ISleekGrid.navigateNext


navigatePageDown(): void

Defined in: src/grid/sleekgrid.tsx:4102

Scrolls by one page downward (or paging gap) and updates active cell if navigable.

Returns

void

Implementation of

ISleekGrid.navigatePageDown


navigatePageUp(): void

Defined in: src/grid/sleekgrid.tsx:4109

Scrolls by one page upward and updates active cell if navigable.

Returns

void

Implementation of

ISleekGrid.navigatePageUp


navigatePrev(): boolean

Defined in: src/grid/sleekgrid.tsx:4226

Navigates to the previous tabbable cell (including wrap to prior row).

Returns

boolean

Implementation of

ISleekGrid.navigatePrev


navigateRight(): boolean

Defined in: src/grid/sleekgrid.tsx:4191

Navigates one cell to the right.

Returns

boolean

Implementation of

ISleekGrid.navigateRight


navigateRowEnd(): boolean

Defined in: src/grid/sleekgrid.tsx:4240

Navigates to the last focusable cell in the active row.

Returns

boolean

Implementation of

ISleekGrid.navigateRowEnd


navigateRowStart(): boolean

Defined in: src/grid/sleekgrid.tsx:4233

Navigates to the first focusable cell in the active row.

Returns

boolean

Implementation of

ISleekGrid.navigateRowStart


navigateTop(): void

Defined in: src/grid/sleekgrid.tsx:4116

Navigates to the first data row.

Returns

void

Implementation of

ISleekGrid.navigateTop


navigateToRow(row): boolean

Defined in: src/grid/sleekgrid.tsx:4132

Navigates to a specific row, preserving current column when possible.

Parameters

row

number

Target row index.

Returns

boolean

true (always reported as handled).

Implementation of

ISleekGrid.navigateToRow


navigateUp(): boolean

Defined in: src/grid/sleekgrid.tsx:4212

Navigates one row upward.

Returns

boolean

Implementation of

ISleekGrid.navigateUp


prepareForOptionsChange()

protected prepareForOptionsChange(): void

Defined in: src/grid/sleekgrid.tsx:1727

Returns

void


registerPlugin()

registerPlugin(plugin): void

Defined in: src/grid/sleekgrid.tsx:506

Prepend-registers a plugin and calls its init(this) immediately.

Parameters

plugin

GridPlugin

Grid plugin to add.

Returns

void

Implementation of

ISleekGrid.registerPlugin


removeCellCssStyles()

removeCellCssStyles(key): void

Defined in: src/grid/sleekgrid.tsx:3233

Removes styles previously added via SleekGrid.addCellCssStyles.

Parameters

key

string

Namespace key.

Returns

void

Implementation of

ISleekGrid.removeCellCssStyles


render()

render(): void

Defined in: src/grid/sleekgrid.tsx:2934

Synchronously renders rows/cells for the current viewport, with throttling. Coalesces calls via a pending _hRender timeout when scrolling fast.

Returns

void

Implementation of

ISleekGrid.render


reorderColumns()

reorderColumns(columnIds, opt?): void

Defined in: src/grid/sleekgrid.tsx:1666

Reorders columns by columnIds to become the new visible order.

Parameters

columnIds

string[]

Desired column id order.

opt?
notify?

boolean

Whether to emit onColumnsReordered (default true).

setVisible?

string[]

When provided, visibility is set to these ids before reorder.

Returns

void

Implementation of

ISleekGrid.reorderColumns


resetActiveCell()

resetActiveCell(): void

Defined in: src/grid/sleekgrid.tsx:3689

Clears the currently active cell (without scrolling).

Returns

void

Implementation of

ISleekGrid.resetActiveCell


resizeCanvas()

resizeCanvas(): void

Defined in: src/grid/sleekgrid.tsx:2364

Recalculates viewport size and updates virtual height/scroll bounds. Call when the container size changes externally.

Returns

void

Implementation of

ISleekGrid.resizeCanvas


scrollActiveCellIntoView()

scrollActiveCellIntoView(): void

Defined in: src/grid/sleekgrid.tsx:4018

Scrolls the active cell into view if one exists.

Returns

void

Implementation of

ISleekGrid.scrollActiveCellIntoView


scrollCellIntoView()

scrollCellIntoView(row, cell, doPaging?): void

Defined in: src/grid/sleekgrid.tsx:3714

Ensures row/cell is visible, paging when needed.

Parameters

row

number

Target view row.

cell

number

Target cell.

doPaging?

boolean

When true, pages before scrolling.

Returns

void

Implementation of

ISleekGrid.scrollCellIntoView


scrollColumnIntoView()

scrollColumnIntoView(cell): void

Defined in: src/grid/sleekgrid.tsx:3729

Horizontally scrolls cell into view.

Parameters

cell

number

Target visible cell index.

Returns

void

Implementation of

ISleekGrid.scrollColumnIntoView


scrollRowIntoView()

scrollRowIntoView(row, doPaging?): void

Defined in: src/grid/sleekgrid.tsx:4029

Vertically scrolls row into view (pads for frozen rows).

Parameters

row

number

View row index.

doPaging?

boolean

When true, page-bumps instead of minimal scroll.

Returns

void

Implementation of

ISleekGrid.scrollRowIntoView


scrollRowToTop()

scrollRowToTop(row): void

Defined in: src/grid/sleekgrid.tsx:4061

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

Parameters

row

number

Target row.

Returns

void

Implementation of

ISleekGrid.scrollRowToTop


setActiveCell()

setActiveCell(row, cell): void

Defined in: src/grid/sleekgrid.tsx:4327

Activates the cell at row/cell (no-op if un-navigable or out of bounds).

Parameters

row

number

Target row.

cell

number

Target cell.

Returns

void

Implementation of

ISleekGrid.setActiveCell


setActiveRow()

setActiveRow(row, cell, suppressScrollIntoView?): void

Defined in: src/grid/sleekgrid.tsx:4348

Marks a row as active (for row-selection integration) without necessarily changing the active cell DOM.

Parameters

row

number

Row to activate.

cell

number

Preferred cell to anchor on.

suppressScrollIntoView?

boolean

When true, does not scroll the row/cell into view.

Returns

void

Implementation of

ISleekGrid.setActiveRow


setCellCssStyles()

setCellCssStyles(key, hash): void

Defined in: src/grid/sleekgrid.tsx:3249

Replaces styles for key and notifies onCellCssStylesChanged.

Parameters

key

string

Namespace key.

hash

CellStylesHash

New hash.

Returns

void

Implementation of

ISleekGrid.setCellCssStyles


setColumnHeaderVisibility()

setColumnHeaderVisibility(visible): void

Defined in: src/grid/sleekgrid.tsx:1905

Shows or hides column headers.

Parameters

visible

boolean

Whether to show.

Returns

void

Implementation of

ISleekGrid.setColumnHeaderVisibility


setColumns()

setColumns(columns): void

Defined in: src/grid/sleekgrid.tsx:1627

Replaces the column set and invalidates layout. Tries to preserve identity when called with a permutation of getColumns().

Parameters

columns

Column<TItem>[]

New columns in desired order.

Returns

void

Implementation of

ISleekGrid.setColumns


setData()

setData(newData, scrollToTop?): void

Defined in: src/grid/sleekgrid.tsx:1837

Replaces the data source and rebinds view events.

Parameters

newData

any

New DataView or plain array.

scrollToTop?

boolean

When true, scrolls to y = 0.

Returns

void

Implementation of

ISleekGrid.setData


setFooterRowVisibility()

setFooterRowVisibility(visible): void

Defined in: src/grid/sleekgrid.tsx:1916

Shows or hides the footer row and updates grand totals when becoming visible.

Parameters

visible

boolean

Whether to show.

Returns

void

Implementation of

ISleekGrid.setFooterRowVisibility


setGroupingPanelVisibility()

setGroupingPanelVisibility(visible): void

Defined in: src/grid/sleekgrid.tsx:1928

Shows or hides the grouping panel.

Parameters

visible

boolean

Whether to show.

Returns

void

Implementation of

ISleekGrid.setGroupingPanelVisibility


setHeaderRowVisibility()

setHeaderRowVisibility(visible): void

Defined in: src/grid/sleekgrid.tsx:1948

Shows or hides the header row (filter row).

Parameters

visible

boolean

Whether to show.

Returns

void

Implementation of

ISleekGrid.setHeaderRowVisibility


setOptions()

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

Defined in: src/grid/sleekgrid.tsx:1745

Merges args into options, validates/updates layout signals and optionally re-renders. Commits or cancels the active edit before changing options.

Parameters

args

GridOptions<TItem>

Partial options to merge.

suppressRender?

boolean

When true, suppresses render pass after set.

suppressColumnSet?

boolean

When true, suppresses setColumns from args.columns.

suppressSetOverflow?

boolean

When true, suppresses setOverflow() adjustment.

Returns

void

Implementation of

ISleekGrid.setOptions


setPreHeaderPanelVisibility()

setPreHeaderPanelVisibility(visible): void

Defined in: src/grid/sleekgrid.tsx:1940

Legacy alias for SleekGrid.setGroupingPanelVisibility.

Parameters

visible

boolean

Whether to show.

Returns

void

Implementation of

ISleekGrid.setPreHeaderPanelVisibility


setSelectedRows()

setSelectedRows(rows): void

Defined in: src/grid/sleekgrid.tsx:4589

Sets selection from view row indices via the attached selection model.

Parameters

rows

number[]

Row indices to select.

Returns

void

Throws

When no selection model is attached.

Implementation of

ISleekGrid.setSelectedRows


setSelectionModel()

setSelectionModel(model): void

Defined in: src/grid/sleekgrid.tsx:543

Attaches a selection model, unregistering any previous one.

Parameters

model

SelectionModel

The new selection model, or null to detach.

Returns

void

Implementation of

ISleekGrid.setSelectionModel


setSortColumn()

setSortColumn(columnId, ascending): void

Defined in: src/grid/sleekgrid.tsx:1427

Sets single-column sorting state.

Parameters

columnId

string

Column id to sort by.

ascending

boolean

Whether ascending.

Returns

void

Implementation of

ISleekGrid.setSortColumn


setSortColumns()

setSortColumns(cols): void

Defined in: src/grid/sleekgrid.tsx:1435

Sets multi-column sorting state and updates header sort indicators.

Parameters

cols

ColumnSort[]

Sort descriptors (columnId + sortAsc).

Returns

void

Implementation of

ISleekGrid.setSortColumns


setTopPanelVisibility()

setTopPanelVisibility(visible): void

Defined in: src/grid/sleekgrid.tsx:1894

Shows or hides the top panel.

Parameters

visible

boolean

Whether to show.

Returns

void

Implementation of

ISleekGrid.setTopPanelVisibility


setVisibleColumns()

setVisibleColumns(columnIds, opt?): void

Defined in: src/grid/sleekgrid.tsx:1682

Shows only the columns whose ids are in columnIds, optionally reordering them.

Parameters

columnIds

string[]

Ids of columns to make visible, in desired order.

opt?
notify?

boolean

Whether to emit onColumnsReordered.

reorder?

boolean

When true (default), reorders to columnIds order.

Returns

void

Implementation of

ISleekGrid.setVisibleColumns


unregisterPlugin()

unregisterPlugin(plugin): void

Defined in: src/grid/sleekgrid.tsx:515

Unregisters a plugin by identity, calling destroy() when available.

Parameters

plugin

GridPlugin

Plugin instance previously passed to SleekGrid.registerPlugin.

Returns

void

Implementation of

ISleekGrid.unregisterPlugin


updateCell()

updateCell(row, cell): void

Defined in: src/grid/sleekgrid.tsx:2272

Re-renders a single cell via the cell's formatter and invalidates async post results.

Parameters

row

number

View row index.

cell

number

Cell/column index.

Returns

void

Implementation of

ISleekGrid.updateCell


updateColumnHeader()

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

Defined in: src/grid/sleekgrid.tsx:819

Updates a header's title/tooltip in place, re-triggering header lifecycle events.

Parameters

columnId

string

Target column id.

title?

New title text or formatter.

string | ColumnFormat<any>

toolTip?

string

New title attribute.

Returns

void

Implementation of

ISleekGrid.updateColumnHeader


updatePagingStatusFromView()

updatePagingStatusFromView(pagingInfo): void

Defined in: src/grid/sleekgrid.tsx:2391

Updates add-new-row paging state from a paging descriptor.

Parameters

pagingInfo

Page size/num/totalPages.

pageNum

number

pageSize

number

totalPages

number

Returns

void

Implementation of

ISleekGrid.updatePagingStatusFromView


updateRow()

updateRow(row): void

Defined in: src/grid/sleekgrid.tsx:2302

Re-renders all cells of the given row.

Parameters

row

number

View row index.

Returns

void

Implementation of

ISleekGrid.updateRow


updateRowCount()

updateRowCount(): void

Defined in: src/grid/sleekgrid.tsx:2414

Recomputes virtual/real scroll heights, page offsets and active cell state after row count or scrollbar visibility changes.

Returns

void

Implementation of

ISleekGrid.updateRowCount