PDA

View Full Version : [CLOSED] Summary is not shown after second data load



bbros
Feb 13, 2015, 7:16 PM

fabricio.murta
Feb 13, 2015, 11:29 PM
Hello,

To avoid recalculating summaries and to allow remote summary support, there's a property you have to set in order to ensure the summary will be recalculated next load.

In order to always make the summary be computed, you need to attach the following listener to the store:


App.MyGroupSummary.updateNext = true


Assuming you set an ID for your GroupingSummary named after MyGroupSummary.

The listener above should work if you bind it to either the Load or BeforeLoad event.

Please let me know if this does not fix your issue with the grid, or if your scenario does not allow the solution I shown you.

bbros
Feb 14, 2015, 12:25 AM
Thank you, this is exactly what I need.

I added this line for the store (line 25)


s.Listeners.BeforeLoad.AddScript("App.MyGroupingSummary.updateNext=true")


and added the ID for the GroupingSummary (line 39)


grd.Features.Add(New GroupingSummary With {.ID = "MyGroupingSummary",


You can mark this thread as closed.

fabricio.murta
Feb 14, 2015, 1:53 AM
Glad it worked for you! Sorry for not giving you the exact listener line, at that point I had completely turned your code upside down here to investigate the best form to fix your issue! :)

Thanks for sharing the outcome!