Issues with Pagination Bar

WorkWithPlus adds a "Pagination Bar" within the grids in order to navigate the records:

IssuepaginationBarImg1

In some situations the "Pagination Bar" may only show one page even if you have more records in your database:

IssuepaginationBarImg2

This issue happens because GeneXus can't properly calculate the Grid.PageCount value so it returns the value "1". As WorkWithPlus uses the Grid.PageCount to generate the "Pagination Bar" it only shows one page.

In this page we'll explain how can you solve this issue if you are working in a Selection with base transaction. 

Issue when having a Formula attribute

If you have a formula attribute in your transaction definition, the "Pagination Bar" may only show one page.

How to solve it?

In order to solve the issue, you can set the formula attribute as "Redundant":

IssuepaginationBarImg3

Comment: this issue won't happen with every formula. It happens, for example, when GeneXus can't resolve the formula directly on the DBMS. A classic situation happens with formulas that call procedures. 

You can check the following GeneXus SAC regarding this issue: https://www.genexus.com/es/developers/websac?data=42532;;

Issue when having a condition

If you have included a condition you may have this issue according to where you load the variable included in it.. For example, if you want to retrieve the CustomerId from the session and filter the records matching that Customer:

IssuepaginationBarImg4

If you assign the variable &CustomerId at the end of the Refresh Event:

IssuepaginationBarImg5

The "Pagination Bar" will display the following:

IssuepaginationBarImg6

How to solve it?

In order to solve the issue, you can assign the variable at the top of the Refresh Event so its considered in the calculation of the Grid.PageCount:

IssuepaginationBarImg7