|
In grids based on attributes, K2BTools uses the “Grid.PageCount” function to display the total number of pages the grid has. However, there are scenarios where this function cannot be calculated, or performing the operation can impact system performance. On this page, we will analyze how to solve the common issues that occur when using Grid.DisplayPageCount.
Grid.PageCount is a native function of GeneXus that can return the total number of pages when the grid has a base table. However, using this function in some scenarios can lead to incorrect behavior and performance issues. Since the resolution of GeneXus SAC #47356, GeneXus can calculate Grid.PageCount even when conditions are evaluated on the client side. Starting from K2BTools 15.3, K2BTools added support for this feature, allowing page count calculation in these scenarios. However, this may impact performance.
-
In the navigation view, there is a constraint with a warning.
-
The term "server paging" does not appear as an optimization in the navigation.
 |
| Warning in Navigation |
At runtime, the following issues may occur:
- Performance Degradation: The performance could be negatively impacted.
- Page Navigation Issues: In versions lower than K2BTools 15.3, the "next page" functionality may not work.
- Incorrect Page Count Display: In K2BTools versions lower than 10.4, a “-1” value may appear when displaying the total number of pages.
Our first recommendation is to try to change the condition that is calculated on the client side so that it’s calculated on the server side. If you have any doubts on how to do this, we strongly recommend contacting the GeneXus Support Team.
If it is not possible to calculate the condition on the server side, the alternative solution is to set the “Display Page Count” property to "False". In that case, the total number of pages will not be shown, but the user will be able to navigate through the pages of the grid.
 |
| Paging with "DisplayPageCount" set to "False" |
|