WorkWithPlus adds a "Pagination Bar" within the grids in order to navigate the records:
In some situations the "Pagination Bar" may only show one page even if you have more records in your database:
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.
Important: GeneXus has solved many of the scenarios that cause these issues in GeneXus 16 Upgrade 9. We strongly recommend upgrading to GeneXus 16 U9 in order to avoid this problem.
If you can't upgrade your GeneXus version, the following tips will provide a workaround, to solve the issue in a Selection with base transaction. However, our recommendation is to upgrade to GeneXus 16 U9, to avoid having this issues.
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":
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:
If you assign the variable &CustomerId at the end of the Refresh Event:
The "Pagination Bar" will display the following:
How to solve it?
In order to solve the issue, you can assign the variable at the top of the Refresh Event so it's considered in the calculation of the Grid.PageCount:
This issue may happen in other scenarios, for example:
- when your grid contains attributes from a Data View
- when having a date attribute in the Full Text Filter (just remove the attribute from the property Full Text Filter node --> Attributes)
- when having a KB with "Runtime Translation" and an enum attribute in your Full Text Filter (just remove the attribute from the property Full Text Filter node --> Attributes)
In these scenarios, we strongly recommend upgrading to GeneXus 16 U9 in order to avoid this problem, as there is not a quick workaround to solve it.