Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Deleting a row in repeat grid does not refresh entire section

SA-8416

Summary



The user's application uses a repeat grid. Each row has a field for entering Error Count. The system calculates the total count and determines the value for another field in the same section accordingly.
For example, the difference between the number of entries and errors gives the number of correct entries. If an existing row is deleted from the repeat grid, the system recalculates the number of correct entries. The User Interface (UI) does not refresh to display the recalculated value. It is observed in the Tracer that ReloadSection is called with correct StreamName, but the latest value is not reflected on screen.

Error Messages



Not Applicable

Steps to Reproduce



Design a section with the following steps:
1. Include a repeat grid layout, which will have a Text input to manually enter a count.
2. Insert two text boxes below the repeat grid. One must be editable, where a numeric value can be entered. Another must be read only. This field will be auto calculated through Declare expression based on values present in Repeat Grid.
3. Log in from user portal. Add few rows, and enter values in those rows. Use a Refresh this Section on Text Input. The value in read-only text field will be updated accordingly.
4. Now delete a row. The value in read-only text field will not be updated.

Root Cause



PRPC-grid add or delete are row-level operations and are by default not expected to refresh the grid or any other section. This is as per the grid design.

Resolution



Perform the following local-change:

Include the code below in a non-autoGenerated section. Include the section below or above the grid control.

<script>
var orig;
if(!orig)
{
orig = pega.u.d.handlePartialSuccess;
}
pega.u.d.handlePartialSuccess = function(responseObj){
orig.call(this,responseObj);
pega.u.d.refreshSection("SectionName",'',''); /* Name of the section that we want to refresh i.e. SectionName */
};
</script>

Published May 20, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us