What is a pagination? and how to implement it?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Hi,

Presenting medium-sized to large data sets in tabular form usually requires a pagination mechanism that enables the client to see some portion of the final result and navigate back and forth through the result set.

You can use segment to achieve the requirement. For example if you are getting 100 records of data from the service, instead of posting 100 records on segment, show first 10 and then on click previous and next shows previous and next 10 records one segment.

To show the previous and next records, developer has to write their own logic. Or you service should pass only 10 records of data with page number. On click on Previous and next you can make service call and fetch the previous, next 10 records.

Hi @Sophie Pullmvn​ ,

Check the attached image which shows basic pagination concept. It is nothing but loading the data in the segment with some base limit say 10 rows per page.

So initially you load 10 rows of data to the segment, later when you click on next page, then you have to remove the current data and load the next 10 rows of data to the segment.

hi,

Can you provide any example code for this to be achieved

@Rexeccv Smith​ , Pls find the attached sample app for basic Next Previous segment pagination.