Grid Data Technical Reference
Grid API
GridApi
Grid data and selection.
Rows and cell values (raw, display and normalised), loading and editing data, filtering and sorting, the current selection, and row nodes. Prefer these methods to calling AG Grid directly when AdapTable wraps the behaviour.
void
Adds a Column Definition to the Grid
Promise<IRowNode[]>
Adds rows to AdapTable (and AG Grid)
Promise<{ addedRows: IRowNode[]; updatedRows: IRowNode[]; }>
Adds or Updates AdapTable (and AG Grid) with new and changed rows
void
Applies current Filtering in AdapTable
void
Removes Column Sorts in AdapTable
void
Removes all current Filters in AdapTable
void
Clears Row Grouping in the Grid
void
Closes the transposed view of the Grid (if open)
void
Collapse all open groups in Row Grouping
Promise<IRowNode[]>
Deletes rows from AdapTable (and AG Grid)
void
Deselects all selected rows, cells and ranges
void
Deselects the AG Grid Row Node in AdapTable
void
AG Grid Row Nodes in AdapTable
void
Deselects Row with given Primary Key Value
Deselects Row with given Primary Key Values
void
Expands all closed groups in Row Grouping
void
Expands Row Groups that contain given keys
RowModelType
Returns AG Grid Row Model Type
Column<any>[]
Return all AG Grid columns
IRowNode[]
Retrieves all Row Nodes currently in the Grid (by default excluding the group rows)
any | undefined
Retrieves Display Value for a given cell
any | undefined
Retrieves Normalised Value for a given cell
any | undefined
Retrieves Raw Value for a given cell
number
Gets the count of the cells in a Column that have the given Raw Value
Returns summary info on Selected Cells
number
Number of columns in the grid, including hidden columns.
any[]
Retrieves all the values for a single Column.
ColumnSort | undefined
Retrieves ColumnSort for a given Column
Returns Column Sort information in AdapTable
any[]
Retrieves the displayed (formatted but not styled) data from the grid (filtered and sorted and visible columns only)
string | undefined
Retrieves Formatted Value for a given Raw Value in given Column
any | undefined
Retrieves Display Value for Cell in given Row and Column
any[]
Retrieves the distinct raw values currently in a Column, sorted.
Useful when building dropdown options (e.g. Action Column select, Forms)
from values that already exist in the Grid.
Returns an empty array if the Column is unknown.
any[]
Retrieves the filtered values for a single Column.
any[]
Retrieves filtered data from the grid
IRowNode | undefined
Retrieves the first Displayed Row Node in AdapTable
IRowNode | undefined
Retrieves the first Row Node in AdapTable
GridCell | undefined
Retrieves Cell in given Row and Column
GridCell[] | undefined
Returns all the Grid Cells in a Column that have the given Display Value
GridCell[] | undefined
Returns all the Grid Cells in a Column that have the given Raw Value
HTMLElement | null
Returns the Grid Container in which the AdapTable Instance is present
any[]
Retrieves all data from the grid
IRowNode[]
Retrieves all Grouped Row Nodes currently in the Grid
InternalState
Returns the Internal section from AdapTable State
any | undefined
Retrieves Normalised Value for Cell in given Row and Column
any
Returns the Primary Key Value for a given Row Node
any[]
Returns the Primary Key Values for a given Row Node collection
any | undefined
Retrieves Raw Value for Cell in given Row and Column
number
Number of data rows, excluding group rows.
IRowNode | undefined
Retrieves the displayed RowNode at the given index
IRowNode
Retrieves Row Node that contains given Primary Key
IRowNode[]
Retrieves Row Nodes that contain given Primary Keys
Returns all current Selected Cells in AdapTable
Returns all current Selected Rows in AdapTable
AdaptableVariant
Returns current AdapTable Variant: vanilla, angular, react, vue
number
Number of columns that are currently visible.
any[]
Retrieves the visible (filtered and sorted) values for a single Column.
any[]
Retrieves visible data from the grid (filtered and sorted from visible columns only)
number
Number of rows currently displayed, after filtering.
IRowNode[]
Retrieves all filtered Row Nodes currently in the Grid (i.e. after applying the current filter)
void
Highlights a Cell in AdapTable
void
Highlights a Column in AdapTable
void
Highlight a row using an adaptable style
void
Highlight rows using an adaptable style
boolean
Checks if given Grid Cell is editable
boolean
Checks if given Grid Cell has been edited (uses Data Change History)
boolean
Checks if all of given Grid Cells are editable
boolean
Whether given Row Node is a Grand Total Row
boolean
Whether AdapTable instance can be Row Grouped
boolean
Whether Grid is currently in Pivot Mode
boolean
Whether AdapTable instance can be pivoted
boolean
Whether AdapTable instance offers cell range selection
boolean
Whether Grid is currently showing Row Groups
boolean
Whether AdapTable instance offers row selection
boolean
Whether a Row is selected
boolean
Whether given Row Node is a Row Group
boolean
Whether Grid is a Master Detail Grid
boolean
Whether Quick Filter is available in the Grid
boolean
Whether given Row Node is in a Summary Row
boolean
Whether Grid displays a Tree Data (structured hierarchical data)
boolean
Whether given Row Node is visible
Grid will jump to cell in a given Row and Column
void
Grid will jump to Column that has given ColumnId
void
Grid will jump to Row containing given Primary Key Value
void
Loads data into grid and fire a RowChanged.trigger='Load' event
Promise<{ addedRows: IRowNode[]; updatedRows: IRowNode[]; removedRows: IRowNode[]; }>
Adds, Updates or Deletes rows in AdapTable (and AG Grid) in single transaction
void
Opens Settings Panel with Grid Info section selected and visible
void
Redraws AdapTable (expensive operation so use sparingly)
void
Refreshes all Cells in the Grid
Refresh a Cell Value in AdapTable
Refresh Cell Values in AdapTable
void
Refresh Column Values in AdapTable
void
Refresh Columns Values in AdapTable
void
Refreshes a single Grid Cell
void
Refreshes a set of Grid Cells
void
Forces a re-render of the Grid Header
void
Forces a re-render of all Group Rows (including aggregations)
void
Forces a re-render of Row with given Primary Key value
void
Forces a re-render of the given row
void
Forces re-render of given rows (if none provided, all rows are refreshed)
void
Removes the Column Definition for a given Column.
void
Select the whole Grid
Selects a group of cells in a given range - provide either primary keys or row indexes
Selects a group of cells in a given range using a query
void
Selects a Column in AG Grid
void
Selects Columns in AG Grid
void
Selects the AG Grid Row Node in AdapTable
void
Selects the AG Grid Row Nodes in AdapTable
void
Selects Row with given Primary Key Value
void
Selects Rows with given Primary Key Values
void
Sorts AdapTable using given Column Sorts
Replaces the grid's column definitions.
void
Updates cell in AdapTable (as an AG Grid edit)
void
Updates multiple cells
void
Sets the grid to Row Group
void
Opens a window with a transposed view of the grid.
boolean
Reverses a data change (if triggered by cell edit)
void
Unhighlights all highlighted Cells in AdapTable
void
Unhighlights all highlighted Columns in AdapTable
void
Remove all highlighted rows
void
Unhighlights a Cell in AdapTable
void
Unhighlights a Column in AdapTable
void
Remove highlight from Row
void
Remove highlight from given Rows
Merges non-stateful AG Grid column properties into an existing column definition. The column is matched by colId. A column that does not exist yet is added.
Merges non-stateful AG Grid column properties into the given column definitions. Each column is matched by colId.
void
Updates Ag Grid Column State for a given Column; use to update STATEFUL AG Grid Column props
void
Updates Ag Grid Column State for given Columns; use to update STATEFUL AG Grid Column props
Promise<IRowNode[]>
Updates AdapTable (and AG Grid) with rows that have changed
Row Changed Event
The Row Changed Event fires whenever rows are loaded, added, updated or deleted through the Grid API, or when a Create, Clone, Edit or Delete Action Column Command is used.
RowChangedInfo
The event provides the RowChangedInfo object:
RowChangedInfo
Payload of the RowChanged event.
Fires when rows are added, updated, deleted or loaded.
Extends , so adaptableApi is included.
Rows that changed, and whether they were added, updated, deleted or loaded.
Custom application Context provided in AdaptableOptions.adaptableContext
rowDataChange is a RowDataChangedInfo:
RowDataChangedInfo
Info for RowDataChangedEvent, which rows changed and why
rowTrigger is set by the Grid API function that made the change:
| Trigger | Grid API function |
|---|---|
| Load | loadGridData |
| Add | addGridData |
| Update | updateGridData |
| Delete | deleteGridData |
Event Subscription
Subscribing to the Event is done the same way as with all Adaptable Events:
api.eventApi.on('RowChanged', (eventInfo: RowChangedInfo) => {
// do something with the info
});Find Out More
See Listening to Cell and Row Changes for a worked example