API REFERENCE
viewportDatasource
Viewport model supplying data for visible row ranges. Implement initialization, range changes, and cleanup.
What does this API do?
Viewport model supplying data for visible row ranges. Implement initialization, range changes, and cleanup.
API for Pro features: Viewport row model
Exact input and result types
viewportDatasource: ViewportDatasource<GridRow>| Item | Value |
|---|---|
| JavaScript name | viewportDatasource |
| HTML attribute | viewport-datasource |
| Default | undefined |
| Input type | ViewportDatasource<GridRow> |
Usage flow
Set this on a property of the Grid element. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.
Read related types
Feature explanations and examples
- Stream the visible range
This suits price feeds and monitoring views where the total count is known but only visible rows need continuous updates. Adjusting the subscription to the scroll range is essential.