datagridcustompagination
Reactive icon

Data Grid Custom Pagination

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 12 Feb (8 hours ago)
 by 
0.0
 (0 ratings)
datagridcustompagination

Data Grid Custom Pagination

Details
Custom pagination in the OutSystems Data Grid component is used when working with large datasets and when server-side data control is required. Instead of loading all records at once, the Data Grid fetches only the records needed for the current page, improving performance and scalability.
Read more


Custom pagination in the OutSystems Data Grid component is a server-side data loading approach used to efficiently handle large datasets. Instead of retrieving all records at once, the Data Grid requests only the subset of data required for the current page. This significantly improves performance, scalability, and user experience, especially in enterprise applications.

By default, loading large volumes of data into the client can cause slow screen rendering and high memory usage. Custom pagination solves this problem by delegating pagination logic to the server, while the Data Grid focuses on rendering and navigation.


How Custom Pagination Works

When custom pagination is enabled, the Data Grid operates in On Demand mode. In this mode, the grid does not automatically fetch data. Instead, it triggers a request whenever the user navigates between pages, changes page size, or refreshes the grid.

The Data Grid internally calculates and provides:

  • StartIndex – the index of the first record required

  • PageSize – the number of records to load per page

These values are passed to server-side logic (usually an Advanced SQL query or Server Action) to retrieve only the relevant data slice.


Server-Side Data Retrieval

On the server side, pagination is implemented using database-supported pagination mechanisms such as:

  • OFFSET / FETCH NEXT (SQL Server, PostgreSQL)

  • ROW_NUMBER()–based pagination (Oracle, SQL Server older versions)

The query returns only the records for the requested page, ordered consistently (for example, by CreatedDate or Id). This ensures stable and predictable paging behavior.

To support correct pagination controls (total pages, next/previous navigation), the Data Grid also requires the total number of records available in the dataset. This is typically retrieved using a separate COUNT(*) query that applies the same filters but does not include pagination.


Data Grid Responsibilities vs Developer Responsibilities

The Data Grid component:

  • Handles pagination UI (page numbers, next/previous buttons)

  • Triggers data refresh requests

  • Displays the returned data

The developer is responsible for:

  • Implementing server-side pagination logic

  • Returning the correct page of data

  • Providing the total record count

  • Ensuring consistent sorting and filtering between data and count queries

Release notes (1.0.0)
License (1.0.0)
Reviews (0)
Team
Other assets in this category