Application Engineering

21st Dec 2022

Server-Side Pagination in Mendix

Share:

Server-Side Pagination in Mendix

When you navigate, server-side pagination requests that each page be loaded individually. The server must support pagination before the client can request data sets with specified page sizes, page indexes, and possibly sorting and filtering criteria. The server then returns the appropriate subset. Server-side pagination manages large amounts of data while maintaining stability and scalability.

Server-Side Pagination has the following advantages

  • It can handle large data sets.
  • Quicker initial page load.
  • Reduce network latency to improve page load time

Server-side pagination in Mendix can be accomplished using Data Grids, either Data Grid 1 or Data Grid 2. This blog will demonstrate how to use Data Grid 1 to achieve server-side pagination.

Take a look at this informative blog post titled : The Power of Low-Code Business Solutions: Why You Shouldn’t Ignore Them.

Steps to implement in the Data grid 1

  • As shown in the image below, create a Microflow that retrieves activity from the database or from the association. This retrieves the data that will be displayed in the grid. Later, you can change the number of data points that appear on the grid.
  • Once you create a microflow for data retrieval, select the data grid from the toolbox and copy it into the UI/Page. It will throw an error by default, as shown in the image below. To address this, we must first use a data source.
  • Now select data source as microflow which we have created before.

  • After selecting the microflow, you will be taken to the page below, where you will be asked to generate the controls for server-side pagination. Click Yes.
  • This will generate all of the required nanoflows and pagination controls, as shown in the image below.
  • The module will then throw an error in the error list
  • To resolve this, we must modify our previously created microflow. We must configure the data return list to List.
  • We now need to specify how much data should be loaded into the page. This is done in the retrieve option, where we can specify the number of rows to load in the grid per page.
  • The offset must then be specified. The offset can be specified as shown below. The number 20 represents the amount of data required per page.

After you’ve completed all of the steps, your server-side pagination is ready to use.

See how we assisted a Middle Eastern Government organization in our success story.

Click to learn

Implementation Challenges

  • We ran into some issues while implementing server-side pagination. The challenges are as follows:
  • We are retrieving data from the microflow page by page. We won’t know how much data is left to load because we aren’t retrieving the entire database.
  • To get around the above limitation, we calculated the count while the page was loading by using Aggregate list operations.
  • There will also be no navigation button to jump to the last page of the grid. This must be done manually by calculating the total number of data in the data source and then calculating the total number of pages in the grid.
  • If you use Advanced Search or any filter options, we must redirect the grid page to the first page whenever we use them.

Author

Jeba pon Selva singh

Jeba Pon Selvasingh is a seasoned Technical Lead with over 8 years in the IT industry, specializing in solution design, low-code development, and enterprise-grade applications. Known for expertise in Angular, ReactJS, and Mendix, Jeba delivers innovative, scalable solutions for complex business needs.

Share:

Latest Blogs

How is Generative Adversarial Network Revolutionizing Design and Prototyping?

Product Engineering

17th Apr 2025

How is Generative Adversarial Network Revolutionizing Design and Prototyping?

Read More
Testing IoT Sensors in Retail: Ensuring Accuracy and Reliability for Inventory Management

Quality Engineering

15th Apr 2025

Testing IoT Sensors in Retail: Ensuring Accuracy and Reliability for Inventory Management

Read More
The AI Advantage in Semiconductor Fabrication: Defect Detection & Yield Optimization for Next-Gen Chip

Gen AI

15th Apr 2025

The AI Advantage in Semiconductor Fabrication: Defect Detection & Yield Optimization for Next-Gen Chip

Read More

Related Blogs

Realizing Agile Transformation – API-Led Integration with WSO2  

Application Engineering

6th Jan 2025

Realizing Agile Transformation – API-Led Integration with WSO2  

In part one of this two-part series – API-Led Integration: A Strategic Approach to Agile...

Read More
API-Led Integration: A Strategic Approach to Agile Transformation

Application Engineering

26th Dec 2024

API-Led Integration: A Strategic Approach to Agile Transformation

Social media has become an integral part of daily life for millions of people. From...

Read More
Boost Your Web App Performance: Offload Tasks with Web Workers 

Application Engineering

7th Nov 2024

Boost Your Web App Performance: Offload Tasks with Web Workers 

Imagine you’re browsing a website, filling out a form, or uploading a large image. Suddenly,...

Read More