Skip to content

@serenity-is/sleekgrid / SleekGrid

Class: SleekGrid<TItem>

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

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:223

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:139

Fired when the active cell changes (ArgsCell).

Implementation of

ISleekGrid.onActiveCellChanged


onActiveCellPositionChanged

readonly onActiveCellPositionChanged: EventEmitter<ArgsGrid>

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

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:143

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:147

Fired after SleekGrid.init completes for this instance.

Implementation of

ISleekGrid.onAfterInit


onBeforeCellEditorDestroy

readonly onBeforeCellEditorDestroy: EventEmitter<ArgsEditorDestroy>

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

Before a cell editor is destroyed (allows intercept).

Implementation of

ISleekGrid.onBeforeCellEditorDestroy


onBeforeDestroy

readonly onBeforeDestroy: EventEmitter<ArgsGrid>

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

Before the grid is destroyed.

Implementation of

ISleekGrid.onBeforeDestroy


onBeforeEditCell

readonly onBeforeEditCell: EventEmitter<ArgsCellEdit>

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

Cancelable; before a cell becomes editable.

Implementation of

ISleekGrid.onBeforeEditCell


onBeforeFooterRowCellDestroy

readonly onBeforeFooterRowCellDestroy: EventEmitter<ArgsColumnNode>

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

Before a footer-row column node is removed.

Implementation of

ISleekGrid.onBeforeFooterRowCellDestroy


onBeforeHeaderCellDestroy

readonly onBeforeHeaderCellDestroy: EventEmitter<ArgsColumnNode>

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

Before a header column node is removed.

Implementation of

ISleekGrid.onBeforeHeaderCellDestroy


onBeforeHeaderRowCellDestroy

readonly onBeforeHeaderRowCellDestroy: EventEmitter<ArgsColumnNode>

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

Before a header-row column node is removed.

Implementation of

ISleekGrid.onBeforeHeaderRowCellDestroy


onCellChange

readonly onCellChange: EventEmitter<ArgsCellChange>

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

After an editor commits a cell change.

Implementation of

ISleekGrid.onCellChange


onCellCssStylesChanged

readonly onCellCssStylesChanged: EventEmitter<ArgsCssStyle>

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

After setCellCssStyles/addCellCssStyles/removeCellCssStyles.

Implementation of

ISleekGrid.onCellCssStylesChanged


onClick

readonly onClick: EventEmitter<ArgsCell, MouseEvent>

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

Click on a cell's canvas.

Implementation of

ISleekGrid.onClick


onColumnsReordered

readonly onColumnsReordered: EventEmitter<ArgsGrid>

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

After columns are reordered (drag or API).

Implementation of

ISleekGrid.onColumnsReordered


onColumnsResized

readonly onColumnsResized: EventEmitter<ArgsGrid>

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

After columns are resized.

Implementation of

ISleekGrid.onColumnsResized


onCompositeEditorChange

readonly onCompositeEditorChange: EventEmitter<ArgsGrid>

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

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:173

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:175

Double-click on a cell.

Implementation of

ISleekGrid.onDblClick


onDrag

readonly onDrag: EventEmitter<ArgsDrag, UIEvent>

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

Ongoing drag (after threshold).

Implementation of

ISleekGrid.onDrag


onDragEnd

readonly onDragEnd: EventEmitter<ArgsDrag, UIEvent>

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

End of drag lifecycle.

Implementation of

ISleekGrid.onDragEnd


onDragInit

readonly onDragInit: EventEmitter<ArgsDrag, UIEvent>

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

Initial drag attempt (cancelable via stopImmediatePropagation).

Implementation of

ISleekGrid.onDragInit


onDragStart

readonly onDragStart: EventEmitter<ArgsDrag, UIEvent>

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

When drag start threshold is passed.

Implementation of

ISleekGrid.onDragStart


onFooterRowCellRendered

readonly onFooterRowCellRendered: EventEmitter<ArgsColumnNode>

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

After a footer-row cell is created.

Implementation of

ISleekGrid.onFooterRowCellRendered


onHeaderCellRendered

readonly onHeaderCellRendered: EventEmitter<ArgsColumnNode>

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

After a header cell is created.

Implementation of

ISleekGrid.onHeaderCellRendered


onHeaderClick

readonly onHeaderClick: EventEmitter<ArgsColumn, MouseEvent>

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

Click on a header column.

Implementation of

ISleekGrid.onHeaderClick


onHeaderContextMenu

readonly onHeaderContextMenu: EventEmitter<ArgsColumn, MouseEvent>

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

Context menu on a header column.

Implementation of

ISleekGrid.onHeaderContextMenu


onHeaderMouseEnter

readonly onHeaderMouseEnter: EventEmitter<ArgsColumn, MouseEvent>

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

Mouse entered a header column.

Implementation of

ISleekGrid.onHeaderMouseEnter


onHeaderMouseLeave

readonly onHeaderMouseLeave: EventEmitter<ArgsColumn, MouseEvent>

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

Mouse left a header column.

Implementation of

ISleekGrid.onHeaderMouseLeave


onHeaderRowCellRendered

readonly onHeaderRowCellRendered: EventEmitter<ArgsColumnNode>

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

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

Implementation of

ISleekGrid.onHeaderRowCellRendered


onKeyDown

readonly onKeyDown: EventEmitter<ArgsCell, KeyboardEvent>

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

Keydown forwarded from focus sinks/canvases.

Implementation of

ISleekGrid.onKeyDown


onMouseEnter

readonly onMouseEnter: EventEmitter<ArgsGrid, MouseEvent>

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

Mouse entered a cell's canvas target.

Implementation of

ISleekGrid.onMouseEnter


onMouseLeave

readonly onMouseLeave: EventEmitter<ArgsGrid, MouseEvent>

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

Mouse left a cell (entering the canvas background).

Implementation of

ISleekGrid.onMouseLeave


onScroll

readonly onScroll: EventEmitter<ArgsScroll>

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

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:207

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

Implementation of

ISleekGrid.onSelectedRowsChanged


onSort

readonly onSort: EventEmitter<ArgsSort>

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

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

Implementation of

ISleekGrid.onSort


onValidationError

readonly onValidationError: EventEmitter<ArgsValidationError>

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

When commitCurrentEdit() fails validation.

Implementation of

ISleekGrid.onValidationError


onViewportChanged

readonly onViewportChanged: EventEmitter<ArgsGrid>

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

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:145

Static emitter also fired after any grid is initialized.

Methods

addCellCssStyles()

addCellCssStyles(key, hash): void

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

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:1480

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:4785

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:4593

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:4645

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:3990

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:1293

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:4702

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:1374

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:4051

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:3419

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:3880

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:620

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:693

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:4184

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:4195

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:721

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:1622

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:683

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:667

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:3409

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:4177

Returns the currently active editor, if any.

Returns

Editor

Implementation of

ISleekGrid.getCellEditor


getCellFromEvent()

getCellFromEvent(e): object

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

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:3759

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:3738

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:4540

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:3837

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:4354

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:1463

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:3779

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:1473

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:1629

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:2083

Returns the grid's container element.

Returns

HTMLElement

Implementation of

ISleekGrid.getContainerNode


getData()

getData(): any

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

Returns the current data source (DataView or array).

Returns

any

Implementation of

ISleekGrid.getData


getDataItem()

getDataItem(row): TItem

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

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:2260

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:1983

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:610

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:1454

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:1440

Returns the editorFactory from current grid options.

Returns

EditorFactory

Implementation of

ISleekGrid.getEditorFactory


getEditorLock()

getEditorLock(): EditorLock

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

Returns the current EditorLock controlling concurrent edits.

Returns

EditorLock

Implementation of

ISleekGrid.getEditorLock


getFooterRow()

getFooterRow(): HTMLElement

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

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:1030

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:2147

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:2205

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:4147

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:986

Returns the grouping panel container, if created.

Returns

HTMLElement

Implementation of

ISleekGrid.getGroupingPanel


getHeader()

getHeader(): HTMLElement

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

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:972

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:1000

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:1008

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:647

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:1812

Returns current merged grid options.

Returns

GridOptions<TItem>

Implementation of

ISleekGrid.getOptions


getPluginByName()

getPluginByName(name): GridPlugin

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

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:993

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:2683

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:3794

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:601

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:2525

Returns the horizontal scroll container (main body viewport).

Returns

HTMLElement


getScrollContainerY()

getScrollContainerY(): HTMLElement

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

Returns the vertical scroll container (main body viewport).

Returns

HTMLElement


getSelectedRows()

getSelectedRows(): number[]

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

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:628

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:1558

Returns the active sort descriptors.

Returns

ColumnSort[]

Implementation of

ISleekGrid.getSortColumns


getTopPanel()

getTopPanel(): HTMLElement

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

Returns the top panel container element.

Returns

HTMLElement

Implementation of

ISleekGrid.getTopPanel


getTotalsFormatter()

getTotalsFormatter(column): ColumnFormat<TItem>

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

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:2090

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:2651

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:705

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:2660

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:4670

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:403

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:2281

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:2291

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:1788

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:2388

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:2366

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:4444

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:4307

Navigates to the last data row.

Returns

void

Implementation of

ISleekGrid.navigateBottom


navigateDown(): boolean

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

Navigates one row downward.

Returns

boolean

Implementation of

ISleekGrid.navigateDown


navigateLeft(): boolean

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

Navigates one cell to the left.

Returns

boolean

Implementation of

ISleekGrid.navigateLeft


navigateNext(): boolean

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

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

Returns

boolean

Implementation of

ISleekGrid.navigateNext


navigatePageDown(): void

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

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:4293

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:4410

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:4375

Navigates one cell to the right.

Returns

boolean

Implementation of

ISleekGrid.navigateRight


navigateRowEnd(): boolean

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

Navigates to the last focusable cell in the active row.

Returns

boolean

Implementation of

ISleekGrid.navigateRowEnd


navigateRowStart(): boolean

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

Navigates to the first focusable cell in the active row.

Returns

boolean

Implementation of

ISleekGrid.navigateRowStart


navigateTop(): void

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

Navigates to the first data row.

Returns

void

Implementation of

ISleekGrid.navigateTop


navigateToRow(row): boolean

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

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:4396

Navigates one row upward.

Returns

boolean

Implementation of

ISleekGrid.navigateUp


prepareForOptionsChange()

protected prepareForOptionsChange(): void

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

Returns

void


registerPlugin()

registerPlugin(plugin): void

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

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:3380

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:3080

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:1755

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:3873

Clears the currently active cell (without scrolling).

Returns

void

Implementation of

ISleekGrid.resetActiveCell


resizeCanvas()

resizeCanvas(): void

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

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:4202

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:3898

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:3913

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:4213

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:4245

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:4553

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:4574

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:3396

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:2030

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:1716

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:1962

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:2041

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:2053

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:2073

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:1834

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:2065

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:4815

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:573

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:1516

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:1524

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:2019

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:1771

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:545

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:2397

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:908

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:2517

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:2427

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:2540

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

Returns

void

Implementation of

ISleekGrid.updateRowCount