Embed the section you want to refresh in a dynamic layout and you have a refresh condition to refresh the layout (check screenshot). In which you can use, either DataPage change or list changes. So whenever a row is added/removed from the grid, the respective Page or list will be updated and refresh will be performed on the embedded section.
I have section Main, which included 2 sections: SearchResult & SearchFilter and I want to refresh SearchFilter, when data in SearchResult has changed.
But maybe the problem appears because pega first loaded section SearchFilter, and then SearchResult?
I mean, refresh condition calculate only when a section is loaded, but I need it works more like 'declare expressions' (when the pxResultsCount property on PageList change, for example, it should call the sections to refresh)
I checked in the tracer, PageList in refresh conditions (screen attached) exist, and this is how data changed:
1. Main Section loaded, BorrowersForAssignments.pxResultCount = 3
2. I changed data in SearchFilterSection
3. Main section going to refresh
4. First, it refreshes SearchFilter section (and I cannot change the order of sections load also)
5. BorrowersForAssignments.pxResultCount doesn't change (but it anyway reloaded data in dynamic layout, not sure why)
6. Refresh SearchResult, also changed BorrowersForAssignments.pxResultCount (it =2 now)
7. But the first section doesn't refresh (again, maybe it`s because refresh conditions don`t work like declare expression, i.e. it is "not push" sections to refresh and only calculated when section refreshing in normal way?)