Highlighting and Jumping
Summary
- AdapTable provides methods in Grid API which allows the user to highlight given cells, columns and rows
- The Highlight uses the AdapTable Style object
- AdapTable also provides Grid API methods which allows the user to jump to given cells, columns and rows
The Grid API section of AdapTable API includes many useful Grid related functions.
These include functions which facilitate 2 useful, often connected, Grid-related activities:
- highlighting cells and rows
- jumping to columns, rows and cells
Note
Grid API highlighting is a temporary, programmatic style. It is not the same as:
- Alert
HighlightCell— styles a cell when an Alert fires - Flashing Cells — flashes when a Change or Observable rule is true
- Format Column — a persistent column style or condition
Highlighting
There are a number of Grid API functions which facilitate cell, row and column highlighting:
highlightCellunHighlightCellunHighlightAllCellshighlightColumnunHighlightColumnunHighlightAllColumnshighlightRowhighlightRowsunHighlightRowunHighlightRowsunHighlightAllRows
- This demo provides examples of highlighting and unhighlighting using the
Grid API(using Custom Toolbar Buttons):- First button calls
highlightCellto highlight theNamecell for ember.js with a white fore colour and purple back colour (timeout 5 seconds) - Second button calls
highlightRowto highlight the whole row for Solid with a gray fore colour and brown back colour - Third button calls
unHighlightRowfor the Solid row, which clears the highlight - Fourth button calls
highlightColumnfor the Github Stars column (timeout 3 seconds)
- First button calls
Style
Each highlight function receives a commonly used Adaptable Style object which contains numerous properties, allowing for full control over how the highlight looks.
Timeout
The highlight functions can be provided with a timeout specifying how long the cell or row will remain highlighted.
Deep Dive
Highlight Info Objects and Styles
Jumping
The Grid API section of AdapTable API contains 3 functions that enable moving the focus in the Grid to specific cells, rows or columns:
jumpToRowjumpToColumnjumpToCell
- This demo provides examples of "jumping" using the
Grid API - We provide 3 Custom Toolbar Buttons which each call a jump-related function:
- First button calls
jumpToCellfunction to jump toCreated Atin the Quasar row (the last row in the grid) - Second button calls
jumpToRowfunction to jump to Angular row (2nd from top) - Third button calls
jumpToColumnfunction to jump to theIssue Changecolumn (at the far end of the grid)
- First button calls
- Additionally we provide a Custom Context Menu Item that displays all Columns in the Grid, and AdapTable will jump to the Column selected