Repeat Grid layouts with conditional buttons disregard the specified button condition and enable all buttons in all rows of all pages of the grid. Your application has a work form designed with a paginated Repeat Grid in which the first column of the grid contains the Check Box UI element with an ON CHANGE event set to Post Value, and the last column of the grid contains a button (for example, a button labeled) with a Disabled condition specified for it. Every page of the grid is designed with these columns and, by default, no check box is selected.
When you select the check box in one row of the grid, you expect the button in that row alone to be enabled because the pxCheckbox UI control has the event ON CHANGE set to Post Value. Instead, all of the buttons in all the rows of the grid are enabled. This behavior is unexpected.
Here is an example of the problem.
- In this Repeat Grid design form, select a check box of any row in the grid.
- Go to Page 2 of the grid and again selected a check box for one row. You see the same unexpected results: the
The logic for condition handlers in older Pega-provided UI elements is based on the ID value of the property. Therefore, in the Repeat Grid, the Disable condition always fails. Use the Disable When condition on the server instead of the client, which prevents the older logic for condition handlers from being processed.
Include the button that needs to be enabled in its own section. Then, specify a Refresh When condition on the button based on when the check box property changes. The following screens illustrate how to do this:
After you perform this local change, you can expect to see the following results at run time. The following screens show that only one row in the grid has a button enabled: