property

ColumnAutosizeParams

The parameters the columnAutosize method accepts.

columns

property

A list of columns to autosize. If omitted, all columns are included in the operation.

No properties

dryRun

property

If true , performs the autosize calculation without applying the changes. Returns the calculated widths.

Type

boolean

includeHeader

property

If true , includes the column header when calculating the autosize width.

Type

boolean

property

ColumnMoveParams

The parameters that may be provided to the columnMove API method.

before

property

If the move columns should be placed before the target column.

Type

boolean

moveColumns

property

The columns being moved. May be the column id or the column itself. All the columns should be present in the grid's column definitions.

No properties

moveTarget

property

The move target for the columns. The target may not be present in the move columns, i.e. can not move a column to itself.

Type

string | number | Column

Variants

  • string
  • number
  • Column (docs)

updatePinState

property

If the pin state of the columns being moved should be updated to match the target column.

Type

boolean

property

FocusCellParams

The accepted input types for the focusCell method, which updates the active focus in LyteNyte Grid. Supports various formats:

  • A row/column pair to focus a specific cell.
  • A header or group header cell position.
  • A directional alias ("next", "prev", "up", "down") relative to the current focus (only when the grid is focused).

Type

{ column: string | number | Column; row: number } | PositionHeaderCell | Omit | "next" | "prev" | "up" | "down"

Variants

  • { column: string | number | Column; row: number }
  • PositionHeaderCell (docs)
  • Omit
  • "next"
  • "prev"
  • "up"
  • "down"

property

GridApi

The LyteNyte Grid API provides a comprehensive set of methods that allow developers to programmatically query, update, and manipulate grid state and data.

columnAutosize

property

Automatically adjusts the widths of columns based on their content. Accepts optional parameters to control the behavior.

Parameters

paramsColumnAutosizeParams (docs)

Returns

Record

columnById

property

Returns the column with the specified id. If no matching column is found, returns undefined .

Parameters

idstring

Returns

undefined | Column

columnByIndex

property

Returns the column at the specified visible index. If the index is out of bounds or the column is hidden (due to visibility rules or collapsed groups), this will return null.

Parameters

columnIndexnumber

Returns

null | Column

columnField

property

Retrieves the calculated value for a specific column and row. Useful in cases where the column's field is not a direct path, or when additional logic is involved in determining cell values. It provides access to LyteNyte Grid's internal field evaluation pipeline.

Parameters

columnOrIdstring | Column
rowFieldDataParam (docs)

Returns

unknown

columnIndex

property

Returns the index of a visible column based on its id or column object. Returns -1 if the column is not currently visible (e.g., hidden or inside a collapsed group).

Parameters

columnOrIdstring | Column

Returns

number

columnMove

property

Moves one or more columns before or after a specified target column. This operation respects column group visibility and layout rules.

Parameters

paramsColumnMoveParams (docs)

Returns

void

columnResize

property

Resizes one or more columns by providing an object where each key is a column id and the value is the new width in pixels.

Parameters

columnsRecord

Returns

void

columnToggleGroup

property

Toggles the expansion state of one or more column groups. You can also pass a boolean to directly set the expansion state.

Parameters

groupstring | string[]
stateboolean

Returns

void

columnUpdate

property

Applies updates to one or more columns. Each key in the object is a column id, and each value is the set of updates to apply.

Parameters

updatesRecord

Returns

void

dialogFrameClose

property

Closes dialog frames. If an id is provided, only the dialog with that id is closed; otherwise, all open dialogs will be closed.

Parameters

idstring

Returns

void

dialogFrameOpen

property

Opens a dialog frame by its id. You may optionally provide a context object that will be passed into the dialog's renderer for dynamic configuration.

Parameters

idstring
contextany

Returns

void

editBegin

property

Starts cell editing at a specified location. If the grid is set to read-only mode, this method has no effect.

Parameters

paramsEditBeginParams (docs)

Returns

void

editEnd

property

Ends the currently active cell edit. If there is no active edit session, the method does nothing. Can optionally cancel the edit if true is passed.

Parameters

cancelboolean

Returns

void

editIsCellActive

property

Returns true if the provided cell is currently being edited. Useful for conditionally rendering custom cell UI.

Parameters

paramsEditBeginParams (docs)

Returns

boolean

editUpdate

property

Applies an edit to the specified cell programmatically. This directly updates the data without going through the UI.

Parameters

paramsEditUpdateParams (docs)

Returns

void

eventAddListener

property

Adds an event listener to the grid for a specified event. Returns a function that can be called to remove the listener.

Parameters

eventK
fn(event: ) => void

Returns

() => void

eventFire

property

Manually dispatches a grid event with a given payload. This is intended for advanced usage where custom behavior or testing scenarios require simulating native event lifecycles.

Parameters

nameK
event``

Returns

void

eventRemoveListener

property

Removes a registered event listener. The exact event and handler function must be provided.

Parameters

eventK
fn(event: ) => void

Returns

void

exportCsv

property

Exports the cell data for a given rectangle of the grid as a CSV-formatted string. The rectangle can be customized through parameters such as selected rows, columns, or cell ranges.

Parameters

paramsExportCsvParams (docs)

Returns

Promise

exportCsvFile

property

Generates a downloadable CSV Blob from the selected rectangular area of grid cell data. Can be used to trigger a file download in the browser.

Parameters

paramsExportCsvParams (docs)

Returns

Promise

exportDataRect

property

Returns the raw cell data within a rectangular selection of the grid. This can be useful for custom data processing or exporting workflows.

Parameters

paramsExportDataRectParams (docs)

Returns

Promise

focusCell

property

Sets focus to a specific cell or navigates the focus based on a direction keyword. Useful for keyboard-driven navigation and programmatic focus management.

Parameters

positionFocusCellParams (docs)

Returns

void

popoverFrameClose

property

Closes popover frames. If an id is provided, only the corresponding frame is closed; otherwise, all popover frames will be dismissed.

Parameters

idstring

Returns

void

popoverFrameOpen

property

Opens a popover frame at the specified target element or virtual target. An optional context can be passed into the popover renderer for configuration.

Parameters

idstring
targetHTMLElement | VirtualTarget
contextany

Returns

void

positionFromElement

property

Returns the grid-relative position of the specified HTML element. This can help determine if an element belongs to a specific grid cell, header, or other region—useful for anchoring popovers or tooltips.

Parameters

elHTMLElement

Returns

null | PositionUnion

rowById

property

Retrieves a row by its unique id. Returns null or undefined if the row doesn't exist or is not currently available in the data source.

Parameters

idstring

Returns

undefined | null | RowNode

rowByIndex

property

Retrieves a row based on its index and optional section (body, pinned top, or pinned bottom). Returns null or undefined if the index is out of range.

Parameters

indexnumber
sectionRowSection (docs)

Returns

undefined | null | RowNode

rowDetailIsExpanded

property

Checks whether the detail panel for the given row is currently expanded. Returns true if expanded.

Parameters

rowOrIdstring | RowNode

Returns

boolean

rowDetailRenderedHeight

property

Returns the rendered height of the row's detail section only. Does not include the standard row height.

Parameters

rowOrIdstring | RowNode

Returns

number

rowDetailToggle

property

Toggles the detail expansion for the specified row. Optionally provide a boolean to explicitly set the expansion state.

Parameters

rowOrIdstring | RowNode
stateboolean

Returns

void

rowGroupApplyExpansions

property

Applies multiple group row expansion states using a mapping of row ids to expansion booleans. Useful when restoring or syncing expansion state.

Parameters

expansionsRecord

Returns

void

rowGroupColumnIndex

property

Returns the group index associated with a group column. Useful in header or cell renderers dealing with auto-generated group columns in the grid.

Parameters

cColumn (docs)

Returns

number

rowGroupIsExpanded

property

Returns a boolean indicating if the specified group row is currently expanded.

Parameters

rowRowGroup (docs)

Returns

boolean

rowGroupToggle

property

Toggles the expansion state of a group row. Optionally accepts a boolean state to set expansion explicitly. This method triggers the row group expansion lifecycle.

Parameters

rowRowGroup (docs)
stateboolean

Returns

void

rowHandleSelect

property

A method that may be used in DOM event handlers to trigger row selection logic. Ideal for integrating checkbox-based or custom selection workflows. Also supports bulk row selection.

Parameters

paramsRowHandleSelectParams (docs)

Returns

void

rowIsGroup

property

Type guard that checks if a row node is a group. Helps distinguish between leaf and group rows.

Parameters

rowRowNode (docs)

Returns

``

rowIsLeaf

property

Type guard that determines whether a row node is a leaf node (i.e., not a group). Useful when working with union row types such as RowLeaf and RowGroup.

Parameters

rowRowNode (docs)

Returns

``

rowSelect

property

Selects a specific set of rows based on the provided RowSelectOptions . Triggers corresponding selection-related grid events.

Parameters

paramsRowSelectOptions (docs)

Returns

void

rowSelectAll

property

Selects all rows in the current grid view. Accepts RowSelectAllOptions for fine-grained control. Triggers selection-related events.

Parameters

paramsRowSelectAllOptions (docs)

Returns

void

rowSelected

property

Returns the list of currently selected row nodes. Note that some returned rows may not be part of the visible grid, depending on the data state.

Parameters

This function takes no parameters.

Returns

RowNode[] (docs)

scrollIntoView

property

Ensures the specified row and/or column is scrolled into view. Accepts a configuration object that controls the scroll behavior.

Parameters

optionsScrollIntoViewOptions (docs)

Returns

void

sortForColumn

property

Retrieves the current sort object and its index from the sort model for a given column. If no sort applies to the column, returns null.

Parameters

columnOrIdstring

Returns

null | { index: number; sort: SortModelItem }

useRowDrag

property

A React hook that returns props and state for row dragging support. These props can be attached to a drag handle in your component to initiate drag behavior. This must follow React’s hook rules.

Parameters

paramsUseRowDragParams (docs)

Returns

{ dragProps: any; isDragging: boolean }

property

RowHandleSelectParams

The parameters used for the rowHandleSelect API method of LyteNyte Grid.

shiftKey

property

Indicates whether the shift key is pressed. Required for enabling range-based (bulk) row selections.

Type

boolean

target

property

The event target to handle.

TypeEventTarget

property

ScrollIntoViewOptions

Options for the scrollIntoView API. Allows you to scroll a specific row and/or column into view, ensuring they are visible in the viewport.

behavior

property

Defines the scrolling behavior. "smooth" animates the scroll, "auto" uses browser default behavior, and "instant" jumps immediately.

Type

"auto" | "smooth" | "instant"

Variants

  • "auto"
  • "smooth"
  • "instant"

column

property

The column index, column id, or column object to bring into view. Triggers a horizontal scroll if the column is not currently visible.

Type

string | number | Column

Variants

  • string
  • number
  • Column (docs)

row

property

The index of the row to bring into view. Triggers a vertical scroll if the row is not currently visible.

Type

number