Build your web apps using Smart UI
Smart.Grid - Paging
Grid Paging
Pagination can be enabled in Smart.Grid in order to view large data sets page by page and navigate through them easily.
Pagination is configured via two properties/objects: paging and pager.
To enable paging, set paging.enabled to true.
The number of Grid rows per page can be set via paging.pageSize. The default number is 10. The current page index can be get or set by accessing paging.pageIndex.
Once pages are set up, they can be navigated in two ways:
More information: property paging in the Grid API documentation.
Pager
Pager is a user interface component that allows for easy navigation of Grid pages and customization of paging settings. The pager part of Smart.Grid is an instance of Smart.Pager (<smart-pager>)
To enable the pager, set pager.visible to true.
Parts of the pager:
- Navigation buttons
- Page index selectors
- Auto ellipsis
- Navigation input
- Page size selector
- Summary
Additional settings of the pager object that control these parts are:
- autoEllipsis - sets the ellipsis display mode.
- position - sets the position of pager - 'near' (above rows), 'far' (below rows), or 'both'.
- template - sets a template for the pager.
- pageSizeSelector - describes the settings for the 'rows per page' option.
- summary - describes the summary settings.
- navigationButtons - describes the navigation buttons settings.
- navigationInput - describes the settings about navigation input option.
- pageIndexSelectors - describes the settings for the numeric page buttons.
More information: property pager in the Grid API documentation.
Spinner
An alternative to the pager is the spinner, which can be enabled by setting paging.spinner.enabled to true. The spinner appears as a pair of arrows above the Grid's scrollbar. Pressing the arrows navigates through Grid pages.
The property paging.spinner.step determines the number of pages to navigate via the spinner.
For AI tooling
Developer Quick Reference
Topic: grid-paging Component: Grid Framework: JavaScript
Main methods: (none detected)
Common config keys: pager
Implementation Notes
Compatibility: Modern browsers / Web Components API access pattern: const component = document.querySelector(...) + component.method()
Lifecycle guidance: Initialize configuration first, then invoke imperative API when element is available in DOM.
Common pitfalls:
- Calling methods before element initialization.
- Reassigning large configuration partially without understanding merge behavior.
- Missing required module script import for component type.
Validation checklist:
- Ensure module scripts and CSS are loaded once.
- Keep data schema aligned with columns/series definitions.
- Verify method calls target initialized component instance.