Pagination

Certified Senior Developer

Hi,

I am trying to make an interface wherein I have a read only grid that displays data from a table stored in the database. Now I wrote an expression rule to fetch the data and passed it in the data parameter of the read only grid.

I want to implement pagination so that only 10 records initially are shown, clicking on the side arrow button '>' will load the next 10 records i.e. I will be running the query again and again for every 10 records changing my startIndex and batchSize. this will ensure that the query will not fail if the data is huge.

I wanted help in implementing the pagination as I tried implementing a few things and it didn't work. I'll attach what I have implemented.

PS : The pageSize parameter will not work, as the requirement is to "not use" pageSize. 

  

This is the expression rule where increment tells the batchSize, and times lets me tell the startIndex

This is the interface code

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    It is a training.

    The task given was, I need to fetch data from the database in batch format. i.e. 10 rows at a time. Now initially I did the page size thing and it worked fine.

    But then 1 complexity added was to pass only 10 records at a time to the grid and not the entire data from the table. So the page size will not do my job here

    Onto the didn't work part, I tried passing 10 records, but then It did not show me the '>' key to move to next batch of records. I tried adjusting the records such that I get the '>' key, but then problem was, the '<' key was disabled. Now I can get the next 10 records, but I can't access the previous 10 records   

Children