React Data GridGrid API Reference

To access the api see: Grid Api.

Accessories

showColumnChooser
Function
Show the column chooser.
showColumnFilter
Function
Show the filter for the provided column.
showColumnMenu
Function
Show the column menu for the provided column.
showContextMenu
Function
Displays the AG Grid context menu
hidePopupMenu
Function
Hides any visible context menu or column menu.
hideColumnChooser
Function
Hide the column chooser if visible.
getSideBar
Function
Returns the current side bar configuration. If a shortcut was used, returns the detailed long form.
setSideBarVisible
Function
Show/hide the entire side bar, including any visible panel and the tab buttons.
isSideBarVisible
Function
Returns true if the side bar is visible.
setSideBarPosition
Function
Sets the side bar position relative to the grid. Possible values are 'left' or 'right'.
openToolPanel
Function
Opens a particular tool panel. Provide the ID of the tool panel to open.
closeToolPanel
Function
Closes the currently open tool panel (if any).
getOpenedToolPanel
Function
Returns the ID of the currently shown tool panel if any, otherwise null.
isToolPanelShowing
Function
Returns true if the tool panel is showing, otherwise false.
refreshToolPanel
Function
Force refreshes all tool panels by calling their refresh method.
getToolPanelInstance
Function
Gets the tool panel instance corresponding to the supplied id.
getStatusPanel
Function
Gets the status panel instance corresponding to the supplied id.

Clipboard

See Clipboard for more information.

cutToClipboard
Function
Cuts data to clipboard by following the same rules as pressing Ctrl+X.
copyToClipboard
Function
Copies data to clipboard by following the same rules as pressing Ctrl+C.
copySelectedRangeToClipboard
Function
Copies the selected ranges to the clipboard.
copySelectedRangeDown
Function
Copies the selected range down, similar to ^ Ctrl+D in Excel.
copySelectedRowsToClipboard
Function
Copies the selected rows to the clipboard.
pasteFromClipboard
Function
Pastes the data from the Clipboard into the focused cell of the grid. If no grid cell is focused, calling this method has no effect.

Column Definitions

See Updating Column Definitions for more information.

getColumnDefs
Function
Returns the current column definitions.
getColumn
Function
Returns the column with the given colKey, which can either be the colId (a string) or the colDef (an object).
getColumns
Function
Returns all the columns, regardless of visible or not.
getAllGridColumns
Function
Returns all the grid columns, same as getColumns(), except a) it has the order of the columns that are presented in the grid b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.

Column Display

setColumnsVisible
Function
Sets the visibility of columns. Key can be the column ID or Column object.
getDisplayNameForColumn
Function
Returns the display name for a column. Useful if you are doing your own header rendering and want the grid to work out if headerValueGetter is used, or if you are doing your own column management GUI, to know what to show as the column name.
getDisplayNameForColumnGroup
Function
Returns the display name for a column group (when grouping columns).
getDisplayedColAfter
Function
Returns the column to the right of the provided column, taking into consideration open / closed column groups and visible columns. This is useful if you need to know what column is beside yours e.g. if implementing your own cell navigation.
getDisplayedColBefore
Function
Same as getVisibleColAfter except gives column to the left.
getAllDisplayedVirtualColumns
Function
Same as getAllGridColumns(), except only returns rendered columns, i.e. columns that are not within the viewport and therefore not rendered, due to column virtualisation, are not displayed.
getAllDisplayedColumns
Function
Returns all columns currently displayed (e.g. are visible and if in a group, the group is showing the columns) for the pinned left, centre and pinned right portions of the grid.
getDisplayedCenterColumns
Function
Same as getAllDisplayedColumns but just for the center portion of the grid.
getDisplayedLeftColumns
Function
Same as getAllDisplayedColumns but just for the pinned left portion of the grid.
getDisplayedRightColumns
Function
Same as getAllDisplayedColumns but just for the pinned right portion of the grid.
getAllDisplayedColumnGroups
Function
Returns all 'root' column headers. If you are not grouping columns, these return the columns. If you are grouping, these return the top level groups - you can navigate down through each one to get the other lower level headers and finally the columns at the bottom.
getCenterDisplayedColumnGroups
Function
Same as getAllDisplayedColumnGroups but just for the center portion of the grid.
getLeftDisplayedColumnGroups
Function
Same as getAllDisplayedColumnGroups but just for the pinned left portion of the grid.
getRightDisplayedColumnGroups
Function
Same as getAllDisplayedColumnGroups but just for the pinned right portion of the grid.

Column Groups

See Column Groups

getColumnGroup
Function
Returns the column group with the given name.
getProvidedColumnGroup
Function
Returns the provided column group with the given name.
setColumnGroupOpened
Function
Call this if you want to open or close a column group.

Column Moving

See Column Moving

moveColumns
Function
Moves columns to toIndex. The columns are first removed, then added at the toIndex location, thus index locations will change to the right of the column after the removal.
moveColumnByIndex
Function
Moves the column at fromIdex to toIndex. The column is first removed, then added at the toIndex location, thus index locations will change to the right of the column after the removal.

Column Pinning

See Column Pinning

isPinning
Function
Returns true if pinning left or right, otherwise false.
isPinningLeft
Function
Returns true if pinning left, otherwise false.
isPinningRight
Function
Returns true if pinning right, otherwise false.
setColumnsPinned
Function
Set a column's pinned / unpinned state. Key can be the column ID, field, ColDef object or Column object.

Column Sizing

See Column Sizing

setColumnWidths
Function
Sets the column widths of the columns provided. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many columnWidth events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to true.
sizeColumnsToFit
Function
Adjusts the size of columns to fit the available horizontal space. Note: it is not recommended to call this method rapidly e.g. in response to window resize events or as the container size is animated. This can cause the scrollbar to flicker. Use column flex for smoother results. If inferring cell data types with custom column types and row data is initially empty or yet to be set, the column sizing will happen asynchronously when row data is added. To always perform this synchronously, set cellDataType = false on the default column definition.
autoSizeColumns
Function
Auto-sizes columns based on their contents. If inferring cell data types with custom column types and row data is initially empty or yet to be set, the column sizing will happen asynchronously when row data is added. To always perform this synchronously, set cellDataType = false on the default column definition.
autoSizeAllColumns
Function
Calls autoSizeColumns on all displayed columns. If inferring cell data types with custom column types and row data is initially empty or yet to be set, the column sizing will happen asynchronously when row data is added. To always perform this synchronously, set cellDataType = false on the default column definition.

Column State

See Column State

getColumnState
Function
Gets the state of the columns. Typically used when saving column state.
applyColumnState
Function
Applies the state of the columns from a previous state. Returns false if one or more columns could not be found.
resetColumnState
Function
Sets the state back to match the originally provided column definitions.
getColumnGroupState
Function
Gets the state of the column groups. Typically used when saving column group state.
setColumnGroupState
Function
Sets the state of the column group state from a previous state.
resetColumnGroupState
Function
Sets the state back to match the originally provided column definitions.

Editing

See Cell Editing for more information.

startEditingCell
Function
Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell.
stopEditing
Function
If a cell is editing, it stops the editing. Pass true if you want to cancel the editing (i.e. don't accept changes).
getEditingCells
Function
If the grid is editing, returns back details of the editing cell(s).
getCellEditorInstances
Function
Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes.

Events

addEventListener
Function
Add an event listener for the specified eventType. Listener will receive the event as a single parameter. Listeners will be automatically removed when the grid is destroyed.
removeEventListener
Function
Remove an event listener.
addGlobalListener
Function
Add an event listener for all event types coming from the grid. Listener will receive eventType and event as parameters. Listeners will be automatically removed when the grid is destroyed. If handling multiple event types it is recommended to use event.type to enable TypeScript to infer the event parameters.
removeGlobalListener
Function
Remove a global event listener.
addRenderedRowListener
Function
Registers a callback to a virtual row. A virtual row is a row that is visually rendered on the screen (rows that are not visible because of the scroll position are not rendered). Unlike normal events, you do not need to unregister rendered row listeners. When the rendered row is removed from the grid, all associated rendered row listeners will also be removed. listen for this event if your cellRenderer needs to do cleanup when the row no longer exists.

Export

See Export for more information.

exportDataAsCsv
Function
Downloads a CSV export of the grid's data.
getDataAsCsv
Function
Similar to exportDataAsCsv, except returns the result as a string rather than download it.
exportDataAsExcel
Function
Downloads an Excel export of the grid's data.
getDataAsExcel
Function
Similar to exportDataAsExcel, except instead of downloading a file, it will return a Blob to be processed by the user.
getSheetDataForExcel
Function
This is method to be used to get the grid's data as a sheet, that will later be exported either by getMultipleSheetsAsExcel() or exportMultipleSheetsAsExcel().
exportMultipleSheetsAsExcel
Function
Downloads an Excel export of multiple sheets in one file.
getMultipleSheetsAsExcel
Function
Similar to exportMultipleSheetsAsExcel, except instead of downloading a file, it will return a Blob to be processed by the user.

Filtering

See Filtering for more information.

getQuickFilter
Function
Get the current Quick Filter text from the grid, or undefined if none is set.
resetQuickFilter
Function
Reset the Quick Filter cache text on every rowNode.
isQuickFilterPresent
Function
Returns true if the Quick Filter is set, otherwise false.
isColumnFilterPresent
Function
Returns true if any column filter is set, otherwise false.
isAnyFilterPresent
Function
Returns true if any filter is set. This includes quick filter, column filter, external filter or advanced filter.
getColumnFilterInstance
Function
Returns the filter component instance for a column. For getting/setting models for individual column filters, use getColumnFilterModel and setColumnFilterModel instead of this. key can be a column ID or a Column object.
getFilterModel
Function
Gets the current state of all the column filters. Used for saving filter state.
setFilterModel
Function
Sets the state of all the column filters. Provide it with what you get from getFilterModel() to restore filter state. If inferring cell data types, and row data is initially empty or yet to be set, the filter model will be applied asynchronously after row data is added. To always perform this synchronously, set cellDataType = false on the default column definition, or provide cell data types for every column.
getColumnFilterModel
Function
Gets the current filter model for the specified column. Will return null if no active filter.
setColumnFilterModel
Function
Sets the filter model for the specified column. Setting a model of null will reset the filter (make inactive). Must wait on the response before calling api.onFilterChanged().
onFilterChanged
FilterChangedEventSourceType
Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs.
destroyFilter
Function
Destroys a filter. Useful to force a particular filter to be created from scratch again.
getAdvancedFilterModel
Function
Get the state of the Advanced Filter. Used for saving Advanced Filter state
setAdvancedFilterModel
Function
Set the state of the Advanced Filter. Used for restoring Advanced Filter state
showAdvancedFilterBuilder
Function
Open the Advanced Filter Builder dialog (if enabled).
hideAdvancedFilterBuilder
Function
Closes the Advanced Filter Builder dialog (if enabled). Un-applied changes are discarded.

Grid Options

getGridOption
Function
Returns the grid option value for a provided key.
setGridOption
Function
Updates a single gridOption to the new value provided. (Cannot be used on Initial properties.) If updating multiple options, it is recommended to instead use api.updateGridOptions() which batches update logic.
updateGridOptions
Function
Updates the provided subset of gridOptions with the provided values. (Cannot be used on Initial properties.)

Integrated Charts

See Integrated Charts for more information.

createRangeChart
Function
Used to programmatically create charts from a range.
createPivotChart
Function
Used to programmatically create pivot charts from a grid.
createCrossFilterChart
Function
Used to programmatically create cross filter charts from a range.
updateChart
Function
Used to programmatically update a chart.
getChartRef
Function
Returns the ChartRef using the supplied chartId.
getChartModels
Function
Returns a list of models with information about the charts that are currently rendered from the grid.
restoreChart
Function
Restores a chart using the ChartModel that was previously obtained from getChartModels().
getChartImageDataURL
Function
Returns a base64-encoded image data URL for the referenced chartId.
downloadChart
Function
Starts a browser-based image download for the referenced chartId.
openChartToolPanel
Function
Open the Chart Tool Panel.
closeChartToolPanel
Function
Close the Chart Tool Panel.

Keyboard Navigation

See Keyboard Navigation for more information.

getFocusedCell
Function
Returns the focused cell (or the last focused cell if the grid lost focus).
setFocusedCell
Function
Sets the focus to the specified cell. rowPinned can be either 'top', 'bottom' or null (for not pinned).
clearFocusedCell
Function
Clears the focused cell.
tabToNextCell
Function
Navigates the grid focus to the next cell, as if tabbing.
tabToPreviousCell
Function
Navigates the grid focus to the previous cell, as if shift-tabbing.
setFocusedHeader
Function
Sets the focus to the specified header. If floatingFilter is true, the Column's floatingFilter element will be focused.

Master Detail

See Master Detail for more information.

getDetailGridInfo
Function
Returns the DetailGridInfo corresponding to the supplied detailGridId.
forEachDetailGridInfo
Function
Iterates through each DetailGridInfo in the grid and calls the supplied callback on each.
addDetailGridInfo
Function
Register a detail grid with the master grid when it is created.
removeDetailGridInfo
Function
Unregister a detail grid from the master grid when it is destroyed.

Miscellaneous

getState
Function
Get the current state of the grid. Can be used in conjunction with the initialState grid option to save and restore grid state.
getCellValue
Function
Gets the cell value for the given column and rowNode (row). Will return the cell value or the formatted value depending on the value of params.useFormatter.
expireValueCache
Function
Expire the value cache.
destroy
Function
Will destroy the grid and release resources. If you are using a framework you do not need to call this, as the grid links in with the framework lifecycle. However if you are using Web Components or native JavaScript, you do need to call this, to avoid a memory leak in your application.
isDestroyed
Function
Returns true if the grid has been destroyed.
setGridAriaProperty
Function
Sets an ARIA property in the grid panel (element with role="grid"), and removes an ARIA property when the value is null.

Example:
api.setGridAriaProperty('label', 'my grid') will set aria-label="my grid".
api.setGridAriaProperty('label', null) will remove the aria-label attribute from the grid element.
getGridId
Function
Returns the gridId for the current grid as specified via the gridOptions property gridId or the auto assigned grid id if none was provided.
isAnimationFrameQueueEmpty
Function
Returns true when there are no more animation frames left to process.

Overlays

See Overlays for more information.

showNoRowsOverlay
Function
Show the no-rows overlay. If suppressNoRowsOverlay is set, or if loading is true, this will not do anything.
hideOverlay
Function
Hide the no-rows overlay if it is showing.

Pagination

See Row Pagination for more information.

paginationIsLastPageFound
Function
Returns true when the last page is known; this will always be the case if you are using the Client-Side Row Model for pagination. Returns false when the last page is not known; this only happens when using Infinite Row Model.
paginationGetPageSize
Function
Returns how many rows are being shown per page.
paginationGetCurrentPage
Function
Returns the 0-based index of the page which is showing.
paginationGetTotalPages
Function
Returns the total number of pages.
paginationGetRowCount
Function
Returns the total number of pageable rows, as impacted by gridOptions.paginateChildRows: true. It is recommended to instead use gridApi.getDisplayedRowCount() if not using pagination, or if gridOption.paginateChildRows=true.
paginationGoToPage
Function
Goes to the specified page. If the page requested doesn't exist, it will go to the last page.
paginationGoToNextPage
Function
Navigates to the next page.
paginationGoToPreviousPage
Function
Navigates to the previous page.
paginationGoToFirstPage
Function
Navigates to the first page.
paginationGoToLastPage
Function
Navigates to the last page.

Pivot and Aggregation

See Pivot and Aggregation for more information

getValueColumns
Function
Get a list of the existing value columns.
addValueColumns
Function
Add the given list of columns to the existing set of value columns.
removeValueColumns
Function
Remove the given list of columns from the existing set of value columns.
setValueColumns
Function
Set the value columns to the provided list of columns.
setColumnAggFunc
Function
Sets the agg function for a column. aggFunc can be one of the built-in aggregations or a custom aggregation by name or direct function.
addAggFuncs
Function
Add aggregations function with the specified keys.
clearAggFuncs
Function
Clears all aggregation functions (including those provided by the grid).

Pivoting

See Pivoting

isPivotMode
Function
Returns whether pivot mode is currently active.
getPivotColumns
Function
Get the columns which the grid is pivoting on.
setPivotColumns
Function
Set the columns for the grid to pivot on.
addPivotColumns
Function
Add columns for the grid to pivot on.
removePivotColumns
Function
Stops the grid from pivoting on the provided columns.
getPivotResultColumn
Function
Returns the pivot result column for the given pivotKeys and valueColId.
setPivotResultColumns
Function
Set explicit pivot column definitions yourself. Used for advanced use cases only.
getPivotResultColumns
Function
Returns the grid's pivot result columns.

Refresh

See View Refresh for more information.

refreshCells
Function
Performs change detection on all cells, refreshing cells where required.
redrawRows
Function
Remove row(s) from the DOM and recreate them again from scratch.
refreshHeader
Function
Redraws the header. Useful if a column name changes, or something else that changes how the column header is displayed.
flashCells
Function
Flash rows, columns or individual cells.

Rendering

getRenderedNodes
Function
Retrieve rendered nodes. Due to virtualisation this will contain only the current visible rows and those in the buffer.
getCellRendererInstances
Function
Returns the list of active cell renderer instances.
getSizesForCurrentTheme
Function
Gets the sizes that various UI elements will be rendered at with the current theme. If you override the row or header height using gridOptions, the override value you provided will be returned.
resetRowHeights
Function
Tells the grid to recalculate the row heights.
onRowHeightChanged
Function
Tells the grid a row height has changed. To be used after calling rowNode.setRowHeight(newHeight).

Row Displayed

getDisplayedRowAtIndex
Function
Returns the displayed RowNode at the given index.
getDisplayedRowCount
Function
Returns the total number of displayed rows.
getFirstDisplayedRowIndex
Function
Get the index of the first displayed row due to scrolling (includes invisible rendered rows in the buffer).
getLastDisplayedRowIndex
Function
Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer).

Row Drag and Drop

See Row Dragging for more information.

addRowDropZone
Function
Adds a drop zone outside of the grid where rows can be dropped.
removeRowDropZone
Function
Removes an external drop zone added by addRowDropZone.
getRowDropZoneParams
Function
Returns the RowDropZoneParams to be used by another grid's addRowDropZone method.

Row Grouping

See Row Grouping for more information.

expandAll
Function
collapseAll
Function
setRowNodeExpanded
Function
Expand or collapse a specific row node, optionally expanding/collapsing all of its parent nodes. By default rows are expanded asynchronously for best performance. Set forceSync: true if you need to interact with the expanded row immediately after this function.
onGroupExpandedOrCollapsed
Function
Informs the grid that row group expanded state has changed and it needs to rerender the group nodes. Typically called after updating the row node expanded state explicitly, i.e rowNode.expanded = false, across multiple groups and you want to update the grid view in a single rerender instead of on every group change.
getRowGroupColumns
Function
Get row group columns.
setRowGroupColumns
Function
Set the row group columns.
addRowGroupColumns
Function
Add columns to the row groups.
removeRowGroupColumns
Function
Remove columns from the row groups.
moveRowGroupColumn
Function
Move the column to a new position in the row grouping order.

Row Nodes

getRowNode
Function
Returns the row node with the given ID. The row node ID is the one you provide from the callback getRowId(params), otherwise the ID is a number (cast as string) auto-generated by the grid when the row data is set.
forEachNode
Function
Iterates through each node (row) in the grid and calls the callback for each node. This works similar to the forEach method on a JavaScript array. This is called for every node, ignoring any filtering or sorting applied within the grid. If using the Infinite Row Model, then this gets called for each page loaded in the page cache.
forEachNodeAfterFilter
Function
Similar to forEachNode, except skips any filtered out data.
forEachNodeAfterFilterAndSort
Function
Similar to forEachNodeAfterFilter, except the callbacks are called in the order the rows are displayed in the grid.
forEachLeafNode
Function
Similar to forEachNode, except lists all the leaf nodes. This effectively goes through all the data that you provided to the grid before the grid performed any grouping. If using tree data, goes through all the nodes for the data you provided, including nodes that have children, but excluding groups the grid created where gaps were missing in the hierarchy.

Row Pinning

See Row Pinning for more information.

getPinnedTopRowCount
Function
Gets the number of top pinned rows.
getPinnedBottomRowCount
Function
Gets the number of bottom pinned rows.
getPinnedTopRow
Function
Gets the top pinned row with the specified index.
getPinnedBottomRow
Function
Gets the bottom pinned row with the specified index.

RowModel: Client-Side

applyTransaction
Function
Update row data. Pass a transaction object with lists for add, remove and update.
applyTransactionAsync
Function
Same as applyTransaction except executes asynchronously for efficiency.
flushAsyncTransactions
Function
Executes any remaining asynchronous grid transactions, if any are waiting to be executed.
refreshClientSideRowModel
Function
Refresh the Client-Side Row Model, executing the grouping, filtering and sorting again. Optionally provide the step you wish the refresh to apply from. Defaults to everything.
isRowDataEmpty
Function
Returns true if the Client-Side row model has no rows. It is not impacted by filtering and does not include pinned rows.

RowModel: Infinite

See Infinite Row Model for more information.

refreshInfiniteCache
Function
Marks all the currently loaded blocks in the cache for reload. If you have 10 blocks in the cache, all 10 will be marked for reload. The old data will continue to be displayed until the new data is loaded.
purgeInfiniteCache
Function
Purges the cache. The grid is then told to refresh. Only the blocks required to display the current data on screen are fetched (typically no more than 2). The grid will display nothing while the new blocks are loaded. Use this to immediately remove the old data from the user.
isLastRowIndexKnown
Function
Returns false if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll.
setRowCount
Function
Sets the rowCount and maxRowFound properties. The second parameter, maxRowFound, is optional and if left out, only rowCount is set. Set rowCount to adjust the height of the vertical scroll. Set maxRowFound to enable / disable searching for more rows. Use this method if you add or remove rows into the dataset and need to reset the number of rows or instruct the grid that the entire row count is no longer known.
getCacheBlockState
Function
Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.

RowModel: Server-Side

See Server-Side Row Model for more information.

setRowCount
Function
Sets the rowCount and maxRowFound properties. The second parameter, maxRowFound, is optional and if left out, only rowCount is set. Set rowCount to adjust the height of the vertical scroll. Set maxRowFound to enable / disable searching for more rows. Use this method if you add or remove rows into the dataset and need to reset the number of rows or instruct the grid that the entire row count is no longer known.
refreshServerSide
Function
Refresh a server-side store level. If you pass no parameters, then the top level store is refreshed. To refresh a child level, pass in the string of keys to get to the desired level. Once the store refresh is complete, the storeRefreshed event is fired.
getServerSideGroupLevelState
Function
Returns info on all server side group levels.
retryServerSideLoads
Function
Gets all failed server side loads to retry.
applyServerSideTransaction
Function
Apply transactions to the server side row model.
applyServerSideTransactionAsync
Function
Batch apply transactions to the server side row model.
applyServerSideRowData
Function
Applies row data to a server side store. New rows will overwrite rows at the same index in the same way as if provided by a datasource success callback.
getServerSideSelectionState
Function
Returns an object containing rules matching the selected rows in the SSRM. If rowSelection.groupSelects is 'self' the returned object will be flat, and will conform to IServerSideSelectionState. If rowSelection.groupSelects is 'descendants' or 'filteredDescendants' the returned object will be hierarchical, and will conform to IServerSideGroupSelectionState.
setServerSideSelectionState
Function
Set the rules matching the selected rows in the SSRM. If rowSelection.groupSelects is 'self' the param will be flat, and should conform to IServerSideSelectionState. If rowSelection.groupSelects is 'descendants' or 'filteredDescendants' the param will be hierarchical, and should conform to IServerSideGroupSelectionState.
getCacheBlockState
Function
Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.
isLastRowIndexKnown
Function
Returns false if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll.

Scrolling

ensureIndexVisible
Function
Vertically scrolls the grid until the provided row index is inside the visible viewport. If a position is provided, the grid will attempt to scroll until the row is at the given position within the viewport. This will have no effect before the firstDataRendered event has fired.
ensureNodeVisible
Function
Vertically scrolls the grid until the provided row (or a row matching the provided comparator) is inside the visible viewport. If a position is provided, the grid will attempt to scroll until the row is at the given position within the viewport. This will have no effect before the firstDataRendered event has fired.
ensureColumnVisible
Function
Ensures the column is visible by scrolling the table if needed. This will have no effect before the firstDataRendered event has fired.
getHorizontalPixelRange
Function
Returns an object with two properties:
  • left: The left pixel position of the current scroll in the grid
  • right: The right pixel position of the current scroll in the grid
  • getVerticalPixelRange
    Function
    Returns an object with two properties:
  • top: The top pixel position of the current scroll in the grid
  • bottom: The bottom pixel position of the current scroll in the grid
  • Selection

    selectAll
    Function
    Select all rows, regardless of filtering and rows that are not visible due to grouping being enabled and their groups not expanded.
    deselectAll
    Function
    Clear all row selections, regardless of filtering.
    selectAllFiltered
    Function
    Select all filtered rows.
    deselectAllFiltered
    Function
    Clear all filtered selections.
    selectAllOnCurrentPage
    Function
    Select all rows on the current page.
    deselectAllOnCurrentPage
    Function
    Clear all filtered on the current page.
    getSelectedNodes
    Function
    Returns an unsorted list of selected nodes. Getting the underlying node (rather than the data) is useful when working with tree / aggregated data, as the node can be traversed.
    getSelectedRows
    Function
    Returns an unsorted list of selected rows (i.e. row data that you provided).
    setNodesSelected
    Function
    Set all of the provided nodes selection state to the provided value.
    getBestCostNodeSelection
    Function
    Returns a list of all selected nodes at 'best cost', a feature to be used with groups / trees. If a group has all its children selected, then the group appears in the result, but not the children. Designed for use with 'children' as the group selection type, where groups don't actually appear in the selection normally.
    getCellRanges
    Function
    Returns the list of selected cell ranges. The start is the first cell the user clicked on and the end is the cell where the user stopped dragging. Do not assume that the start cell's index is numerically before the end cell, as the user could have dragged up.
    addCellRange
    Function
    Adds the provided cell range to the selected ranges. This keeps any previous ranges. If you wish to only have the new range selected, then call clearCellSelection() first.
    clearCellSelection
    Function
    Clears the selected cell ranges.

    Sorting

    See Row Sorting for more information.

    onSortChanged
    Gets the grid to act as if the sort was changed. Useful if you update some values and want to get the grid to reorder them according to the new values.

    Undo / Redo

    See Undo/Redo Edits for more information.

    undoCellEditing
    Function
    Reverts the last cell edit.
    redoCellEditing
    Function
    Re-applies the most recently undone cell edit.
    getCurrentUndoSize
    Function
    Returns current number of available cell edit undo operations.
    getCurrentRedoSize
    Function
    Returns current number of available cell edit redo operations.