Grid Data Technical Reference
Summary
- Grid API contains many useful functions to manage Grid Data
Grid API
The Grid API section of Adaptable API contains a wealth of functions that allow you to access the Grid in a number of ways:
| Method | Description |
|---|---|
| addAgGridColumnDefinition(columnDefinition) | Adds a Column Definition to the Grid |
| addGridData(dataRows, config) | Adds rows to AdapTable (and AG Grid) |
| addOrUpdateGridData(dataRows, config) | Adds or Updates AdapTable (and AG Grid) with new and changed rows |
| applyFiltering() | Applies current Filtering in AdapTable |
| clearAdaptableSorting() | Removes Column Sorts in AdapTable |
| clearFiltering() | Removes all current Filters in AdapTable |
| clearRowGroupColumns() | Clears Row Grouping in the Grid |
| closeTransposedView() | Closes the transposed view of the Grid (if open) |
| collapseAllRowGroups() | Collapse all open groups in Row Grouping |
| deleteGridData(dataRows, config) | Deletes rows from AdapTable (and AG Grid) |
| deselectAll() | Deselects all selected rows, cells and ranges |
| deSelectNode(rowNode, clearSelection) | Deselects the AG Grid Row Node in AdapTable |
| deSelectNodes(rowNodes, clearSelection) | AG Grid Row Nodes in AdapTable |
| deSelectRow(primaryKeyValue, clearSelection) | Deselects Row with given Primary Key Value |
| deSelectRows(primaryKeyValues, clearSelection) | Deselects Row with given Primary Key Values |
| expandAllRowGroups() | Expands all closed groups in Row Grouping |
| expandRowGroupsForValues(columnValues) | Expands Row Groups that contain given keys |
| getAgGridRowModelType() | Returns AG Grid Row Model Type |
| getAllAgGridColumns() | Return all AG Grid columns |
| getAllRowNodes(config) | Retrieves all Row Nodes currently in the Grid (by default excluding the group rows) |
| getCellDisplayValue(primaryKeyValue, columnId) | Retrieves Display Value for a given cell |
| getCellNormalisedValue(primaryKeyValue, columnId) | Retrieves Normalised Value for a given cell |
| getCellRawValue(primaryKeyValue, columnId) | Retrieves Raw Value for a given cell |
| getCellRawValueCount(columnId, rawValue) | Gets the count of the cells in a Column that have the given Raw Value |
| getCellSummaryInfo() | Returns summary info on Selected Cells |
| getColumnCount() | Returns number of columns in Data Source |
| getColumnSortForColumn(columnId) | Retrieves ColumnSort for a given Column |
| getColumnSorts() | Returns Column Sort information in AdapTable |
| getDisplayValueFromRawValue(rowNode, columnId, rawValue) | Retrieves Formatted Value for a given Raw Value in given Column |
| getDisplayValueFromRowNode(rowNode, columnId) | Retrieves Display Value for Cell in given Row and Column |
| getFilteredData() | Retrieves filtered data from the grid |
| getFirstDisplayedRowNode() | Retrieves the first Displayed Row Node in AdapTable |
| getFirstRowNode() | Retrieves the first Row Node in AdapTable |
| getGridCellFromRowNode(rowNode, columnId) | Retrieves Cell in given Row and Column |
| getGridCellsForDisplayValue(columnId, displayValue) | Returns all the Grid Cells in a Column that have the given Display Value |
| getGridCellsForRawValue(columnId, rawValue) | Returns all the Grid Cells in a Column that have the given Raw Value |
| getGridContainerElement() | Returns the Grid Container in which the AdapTable Instance is present |
| getGridData() | Retrieves all data from the grid |
| getGroupRowNodes(config) | Retrieves all Grouped Row Nodes currently in the Grid |
| getInternalState() | Returns the Internal section from AdapTable State |
| getNormalisedValueFromRowNode(rowNode, columnId) | Retrieves Normalised Value for Cell in given Row and Column |
| getPrimaryKeyValueForRowNode(rowNode) | Returns the Primary Kev Value for a given Row Node |
| getPrimaryKeyValuesForRowNodes(rowNodes) | Returns the Primary Kev Values for a given Row Node collection |
| getRawValueFromRowNode(rowNode, columnId) | Retrieves Raw Value for Cell in given Row and Column |
| getRowCount() | Returns number of rows in Data Source |
| getRowNodeForIndex(rowIndex) | Retrieves the displayed RowNode at the given index |
| getRowNodeForPrimaryKey(primaryKeyValue) | Retrieves Row Node that contains given Primary Key |
| getRowNodesForPrimaryKeys(primaryKeyValues) | Retrieves Row Nodes that contain given Primary Keys |
| getSelectedCellInfo() | Returns all current Selected Cells in AdapTable |
| getSelectedRowInfo() | Returns all current Selected Rows in AdapTable |
| getVariant() | Returns current AdapTable Variant: vanilla, angular, react, vue |
| getVisibleColumnCount() | Returns number of visible columns in Data Source |
| getVisibleData() | Retrieves visible data from the grid (filtered and sorted) |
| getVisibleRowCount() | Returns number of rows in Data Source |
| getVisibleRowNodes(config) | Retrieves all filtered Row Nodes currently in the Grid (i.e. after applying the current filter) |
| highlightCell(cellHighlightInfo) | Highlights a Cell in AdapTable |
| highlightColumn(columnHighlightInfo) | Highlights a Column in AdapTable |
| highlightRow(rowHighlightInfo) | Highlight a row using an adaptable style |
| highlightRows(rowsHighlightInfo) | Highlight rows using an adaptable style |
| isCellEditable(gridCell) | Checks if given Grid Cell is editable |
| isCellEdited(gridCell) | Checks if given Grid Cell has been edited (uses Data Change History) |
| isEveryCellEditable(gridCells) | Checks if all of given Grid Cells are editable |
| isGrandTotalRowNode(rowNode) | Whether given Row Node is a Grand Total Row |
| isGridGroupable() | Whether AdapTable instance can be Row Grouped |
| isGridInPivotMode() | Whether Grid is currently in Pivot Mode |
| isGridPivotable() | Whether AdapTable instance can be pivoted |
| isGridRangeSelectable() | Whether AdapTable instance offers cell range selection |
| isGridRowGrouped() | Whether Grid is currently showing Row Groups |
| isGridRowSelectable() | Whether AdapTable instance offers row selection |
| isGridRowSelected(primaryKeyValue) | Whether a Row is selected |
| isGroupRowNode(rowNode) | Whether given Row Node is a Row Group |
| isMasterDetailGrid() | Whether Grid is a Master Detail Grid |
| isQuickFilterAvailable() | Whether Quick Filter is available in the Grid |
| isSummaryNode(rowNode) | Whether given Row Node is in a Summary Row |
| isTreeDataGrid() | Whether Grid displays a Tree Data (structured hierarchical data) |
| isVisibleRowNode(rowNode) | Whether given Row Node is visible |
| jumpToCell(primaryKeyValue, columnId, rowNode) | Grid will jump to cell in a given Row and Column |
| jumpToColumn(columnId) | Grid will jump to Column that has given ColumnId |
| jumpToRow(primaryKeyValue) | Grid will jump to Row containing given Primary Kev Value |
| loadGridData(data) | Loads data into grid and fire a RowChanged.trigger='Load' event |
| manageGridData(dataRowConfig, dataUpdateConfig) | Adds, Updates or Deletes rows in AdapTable (and AG Grid) in single transaction |
| openGridInfoSettingsPanel() | Opens Settings Panel with Grid Info section selected and visible |
| redrawGrid() | Redraws AdapTable (expensive operation so use sparingly) |
| refreshAllCells(forceUpdate) | Refreshes all Cells in the Grid |
| refreshCell(rowNode, columnId, suppressFlash) | Refresh a Cell Value in AdapTable |
| refreshCells(rowNode, columnIds, suppressFlash) | Refresh Cell Values in AdapTable |
| refreshColumn(columnId) | Refresh Column Values in AdapTable |
| refreshColumns(columnIds) | Refresh Columns Values in AdapTable |
| refreshGridCell(gridCell) | Refreshes a single Grid Cell |
| refreshGridCells(gridCells) | Refreshes a set of Grid Cells |
| refreshGroupRowNodes() | Forces a re-render of all Group Rows (including aggregations) |
| refreshRowByPrimaryKey(primaryKey) | Forces a re-render of Row with given Primary Key value |
| refreshRowNode(rowNode) | Forces a re-render of the given row |
| refreshRowNodes(rowNodes) | Forces re-render of given rows (if none provided, all rows are refreshed) |
| removeAgGridColumnDefinition(columnId) | Removes the Column Definition for a given Column. |
| selectAll() | Select the whole Grid |
| selectCellRange(gridCellRange, clearSelection) | Selects a group of cells in a given range - provide either primary keys or row indexes |
| selectCellRangeByQuery(query, gridCellRange, clearSelection) | Selects a group of cells in a given range using a query |
| selectColumn(columnId) | Selects a Column in AG Grid |
| selectColumns(columnIds) | Selects Columns in AG Grid |
| selectNode(rowNode, clearSelection) | Selects the AG Grid Row Node in AdapTable |
| selectNodes(rowNodes, clearSelection) | Selects the AG Grid Row Nodes in AdapTable |
| selectRow(primaryKeyValue, clearSelection) | Selects Row with given Primary Key Value |
| selectRows(primaryKeyValues, clearSelection) | Selects Rows with given Primary Key Values |
| setAdaptableSorting(columnSorts) | Sorts AdapTable using given Column Sorts |
| setAgGridColumnDefinitions(columnDefinitions) | Sets the Column Definitions for the Grid |
| setCellValue(cellUpdateRequest) | Updates cell in AdapTable (first performs Cell & Server Validation) |
| setCellValues(cellUpdateRequests) | Updates multiple cells |
| setRowGroupColumns(columnIds) | Sets the grid to Row Group |
| showTransposedView(transposeConfig) | Opens a window with a transposed view of Grid |
| undoCellEdit(cellDataChangedInfo) | Reverses a data change (if triggered by cell edit) |
| unHighlightAllCells() | Unhighlights all highlighted Cells in AdapTable |
| unHighlightAllColumns() | Unhighlights all highlighted Columns in AdapTable |
| unHighlightAllRows() | Remove all highlighted rows |
| unHighlightCell(primaryKeyValue, columnId) | Unhighlights a Cell in AdapTable |
| unHighlightColumn(columnId) | Unhighlights a Column in AdapTable |
| unHighlightRow(primaryKeyValue) | Remove highlight from Row |
| unHighlightRows(primaryKeyValues) | Remove highlight from given Rows |
| updateAgGridColumnDefinition(columnDefinition) | Updates Column Definition for given Column; use to update NON-STATEFUL AG Grid Column props (which are merged with existing Column Def) |
| updateAgGridColumnDefinitions(columnDefinitions) | Updates Column Definition for given Columns; use to update NON-STATEFUL AG Grid Column props (which are merged with existing Column Def) |
| updateAgGridColumnState(columnState) | Updates Ag Grid Column State for a given Column; use to update STATEFUL AG Grid Column props |
| updateAgGridColumnStates(columnStates) | Updates Ag Grid Column State for given Columns; use to update STATEFUL AG Grid Column props |
| updateGridData(dataRows, config) | Updates AdapTable (and AG Grid) with rows that have changed |