Home/Data & State/Paging
Data & State

Paging

Server-side pagination with numbered page controls. Navigate between pages and the grid fetches each page from your data source automatically.

#
First Name
Last Name
Department
Salary
Status
1
Alice
Smith
Engineering
40000
Inactive
2
Bob
Smith
Marketing
41000
Active
3
Carol
Smith
Sales
42000
Active
4
David
Smith
HR
43000
Active
5
Emma
Smith
Finance
44000
Active
6
Frank
Smith
Operations
45000
Active
7
Grace
Smith
Design
46000
Active
8
Henry
Smith
Legal
47000
Inactive
9
Iris
Smith
Product
48000
Active
10
Jack
Smith
Support
49000
Active
Rows per page:
1–10 of 500

How paging works

With scrollMode: 'paging', the grid renders a full pagination bar below the data: first / previous / next / last buttons, a "Page X of Y" indicator, and an optional page-size dropdown. Each navigation replaces the current page entirely — rows don't accumulate like they do in infinite scroll.

On every page change, sort, or filter, the grid calls fetchRows() with params.page (1-based page number) and params.offset (= (page - 1) × pageSize). Use whichever your API supports — offset/limit for SQL-style endpoints, page number for cursor-based ones.

Configuration

The options that directly control paging behavior:

  • scrollMode: 'paging' — activates this mode and renders the pagination bar.
  • pageSize (default 50) — rows per page. Becomes the limit in every fetchRows() call. If pageSizeOptions is set, the user can override this value at runtime.
  • pageSizeOptions — array of page-size choices shown in the dropdown (e.g. [10, 25, 50, 100]). Omit or leave empty to hide the dropdown entirely. When the user picks a new size, the grid resets to page 1 and refetches.
  • trackBy — field name or function that returns a stable unique identity per row (e.g. 'id'). Recommended for paging so Angular can efficiently reconcile rows between page transitions instead of re-rendering everything from scratch.
  • height — fixed pixel height of the grid container. The pagination bar sits outside this height, so the total component height is slightly taller than this value.
  • rowHeight (default 48) — uniform row height in px. Unlike virtual paging, classic paging does support autoRowHeight: true if rows have variable content.

Page-size dropdown

Setting pageSizeOptions enables a "Rows per page" dropdown in the pagination bar. The label is configurable via config.messages.rowsPerPage. When the user selects a new size, pageSize updates, the grid resets to page 1, and fetchRows() is called immediately with the new limit.

Customising pagination labels

Every text string in the pagination bar can be overridden via config.messages:

  • rowsPerPage — label next to the page-size dropdown. Default: 'Rows per page'.
  • pageOf — "Page X of Y" separator. Use {0} and {1} as placeholders for current and total. Default: 'of'.
  • firstPage, lastPage, prevPage, nextPage — aria-labels for the navigation buttons.
  • records — unit label in the stats bar (e.g. 'employees'). Default: 'records'.

Choosing the right scroll mode

Use paging when users need to navigate to a specific page, when the workflow involves reviewing a discrete set of rows before moving on, or when your audience expects familiar table-navigation controls. Use infinite scroll for feeds and browsing flows where users scroll until they find what they want.

Set trackBy: 'id' in paging mode — page transitions replace the whole row set, and a stable row identity lets Angular reconcile the DOM instead of re-rendering every row from scratch.

Paging options

PropertyTypeDefaultDescription
config.scrollMode: 'paging'ScrollMode'infinite'Activates classic paging and renders the pagination bar below the rows.
config.pageSizenumber50Rows per page — becomes limit in every fetchRows() call.
config.pageSizeOptionsnumber[]—Choices for the "Rows per page" dropdown; omit to hide it. Picking a size resets to page 1 and refetches.
params.pagenumber—1-based page number passed to fetchRows() — use for cursor/keyset APIs; offset = (page − 1) × pageSize.
config.trackBystring | (row) => unknown—Stable row identity for efficient DOM reconciliation between page transitions.
config.messagesPartial<GridMessages>—Override pagination strings: rowsPerPage, pageOf, firstPage/lastPage/prevPage/nextPage, records.