Question

Pagination

Greetings,

Is there a methodology in the BPM framework to do pagination in Grids?

Like 0

Like

7 comments

Dear Mohammad,

If you want to add auto-numbering to the records in the section grid, feel free to refer to this article describing the whole process 

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-add-auto-numbering-edit-page-field

Best regards,

Dean

Dean Parrett,

Maybe the question was misunderstood.. Ill give you a discrete example:

Lets say I have a 100 records that i want to show them in a Grid. I want to view the first 10 at first, then whenever I scroll down, 10 new records will appear.

The records may not be on the client side at once. Instead, each time I want to view more records a request might be sent to get the new data.

 

Dear Mohammad,

This logic is already implemented for example in the sections. When you scroll down through any sections, do do not see hundreds of records at once but part part. Do you want to change the amount of records displayed by the scrolls? What is your actual business task? 

Looking forward to your reply.

Dean

Dear Dean Parrett,

I want to do the pagination for a grid that is being implemented on a virtual object; The data is being retrieved from a service, not from BPM

Pagination should be implemented on both a server and a client side. If there is a service, it should accept such parameters as a page number and a number of records per page. The parameters are needed to return the correct number of records from a service.

In order to implement a pagination for a virtual detail (on the client side) please follow the instruction below:

1. Add the attributes to the detail for setting the page number and the number of records parameters.

2. Add the method to call the service and load data from it. Configure the service call in the way to pass the page number and the number of records parameters to the server.

3. Override the init method in order to set the initial paging parameters and call the method mentioned above.

4. Override the loadMore method in order to change the page number and load the next number of records.

5. Override the onDetailCollapsedChanged method in order to set the needed paging parameters according to the detail's state change.

After that please save the schema and clean the cache.

Alina Kazmirchuk,

Could you please share a code sample of what are you suggesting?

Unfortunately, we don't have the code example. Please try to implement the functionality according to the mentioned instructions. If there are some issues or implementation difficulties please feel free to contact us and we will kindly help you.

Show all comments