Issue with pagination in Grid tab in View - GeneXus 17 U1

In GeneXus 17 U1, the pagination in Grid tabs in View are not properly working. The pagination shows more pages than the correct ones, so when navigating the grid it only shows the proper records, but more pages are displayed. For example, in the following scenario only 6 pages should be shown but 14 are displayed on the Pagination Bar:

A "Cuenta Caja" Work With web panel lists accounts in a grid with Nombre and Tipo columns, showing entries DGI, Dividendos, Gastos Varios, Mantenimientos, and Sistemas with EGRESO/INGRESO types. Toolbar includes an "Agregar" button, a filter bar (Buscar en: Nombre, Contiene, value field), and pagination showing Página 1 de 1.

As shown before, the pages are not properly calculated by the Grid.PageCount method from GeneXus:

A "Sub Cuenta" grid tab with blurred SubCuenta and SubCuenta Nombre rows illustrates a pagination bug: annotations point out that although there are only 6 pages of data, the pagination bar shows 14 page buttons (Ant, 4, 5, 6, 7, 8, Sig), noting records are only rendered up to the real last page even though extra page buttons appear.

This is a GeneXus issue that happens without WorkWithPlus for Web, that was already reported to the GeneXus team. This only happens in GeneXus 17 U1 in both Java and .Net.

WorkArounds

There are two possible workarounds:

Option 1

Disable the "Sortable by Title" from every attribute of the grid as follows:

The WorkWithPlus for Web pattern editor shows a "View with tabs" node under a Sub Cuenta grid tab, with TableGridHeader containing SubCuentaId and SubCuentaNombre attributes selected. In the Properties panel for gridAttribute SubCuentaId/SubCuentaNombre, red arrows point from "Sortable By Title" (True) and "Column Tags" toward a form preview showing the "Sub Cuenta" tab with SubCuenta and SubCuenta Nombre columns, and the Column Tags value is highlighted as False.

Option 2

Manually assign the variables in the Refresh event, by calculating the proper amount of pages (total records divided by the amount of rows of the grid). You can do this, for example, by creating a procedure where the calculation is done:

GeneXus source code for an object's Refresh event shows WorkWithPlus-generated lines (marked "Generated by DVelop Work With Plus Pattern <a href='Start'>Start</a>/<a href='End'>End</a> - Do not change") calling LoadWWPContext, executing subroutine 'SaveGridState', and assigning &GridCurrentPage and &GridPageCount from Grid.CurrentPage/Grid.PageCount, followed by a manually added line recalculating &GridPageCount via CalculatePages(&CuentaCajaId).

Fix

This problem is solved since GeneXus 17 build 147793 (and higher).