I have a ListGrid that has an expansion component which is another ListGrid (parent and child list grids). The data sources for the parent and child ListGrids are separate. When records are updated in the child, I have added custom DMI logic to execute the fetch for the parent row as well and return that update via the DSResponse.relatedUpdates mechanism. I've looked in the developer console and the updates are happening correctly as I would expect. The issue is I'm not seeing the fields in the parent list grid row updating, even though the data as seen in the console is obviously different. The fields that I'm interested in have a custom CellFormatter to display the data. Will fields that use a custom CellFormatter update when they receive updates from a relatedUpdates DSResponse? If not, what method would I need to call to cause them to update?
Announcement
Collapse
No announcement yet.
X
-
Yes, they would update, you should see that the formatters are being run.
If they are not, calling refreshRow() would force a refresh, so if that works then the issue is that the refresh is not automatic. It should be, so we’d need a way to reproduce the problem in order to look further.
The other possibility would be that your formatters are running, but they are written in a way that they don’t use the new data (eg your code may use caching or something)
-
I put some debug statements in the formatter, it is indeed being run. However, it does not every see the correct value after an update. I'm calling record.getAttribute() on the passed in record from CellFormatter.format(). Is there an easy way to verify that the data from the parent listgrid is being updated from the relatedUpdate?
Comment
-
That's it! Thank you again Blama, I was returning the related update as a fetch instead of an update.
One more related question, now that my parent grid is getting updated correctly, it is now collapsing the expanded component when it receives the updated record, is there a way to stop this behavior?
Comment
Comment