Support Article
Repeat Grid Column Sorting/Filtering not behaving as expected
SA-23059
Summary
In Pega 7.1.7, the rows of main grid are cutting off when custom pagination is used.
User is using two repeating grids. The main repeating grid have expandable rows and on click of any row, it refers to a flow action which displays a repeating sub grid under it. Custom pagination is applied to the main grid. On expanding any row in main grid and performing sorting or filtering on main grid, is cutting off the rows after expanding row in the main grid.
Error Messages
No error message.
Steps to Reproduce
1. Create a repeating grid which refers to pagelist. Enable sorting and filtering for main grid.
2. Make the display details as expandable rows.
3. On click of any row, a flow action is called which refers to sub grid.
4. Enable Custom pagination for main grid.
5. Expand any row and perform sorting or filtering.
Root Cause
Expand pane requires modifying the grid markup to add a details section in the middle of the grid. This is getting corrupted during sorting.
Resolution
Use the following JAVA code in the step for sorting and add a similar step with a when condition for "FILTER" of "pyPreGridUpdate" and configure calling it in the grid configuration in the "operations" tab under "ADVANCED CONFIGURATION":


ClipboardProperty cpPyProp = myStepPage.getIfPresent(tools.getParamValue("PageListProperty"));
if(cpPyProp != null) {
java.util.Iterator itr = cpPyProp.iterator();
while(itr.hasNext()){
ClipboardProperty temp = (ClipboardProperty)itr.next();
if(temp != null && temp.getPageValue()!=null && !temp.getPageValue().isReadOnly()){
temp.getPageValue().getProperty("pyExpanded").setValue("false");
}
}
}
Published May 12, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.