I am attempting to make use of the XamDataGrid's external summaries feature. I have registered a QuerySummaryResult event handler and in that handler I am using QuerySummaryResultEventArgs.SetSummaryValue to provide the result of my custom summary calculation. This works - I can indeed provide a summary value and observe it in the grid. But, here is my problem: how do I determine the set of data records that need to be summarized? My QuerySummaryResult handler is being called to handle the SummaryDefinitions which I have placed in the xaml (summarize all of the data). My QuerySummaryResult handler is also being called to provide the summaries needed when the users performs a group by operation. How do I determine which data items need to be summarized?
Hello Robert,
Thank you for your post. I have been looking into and I can suggest you use the following code in order to get the DataRecords that should be summarized:
var records = e.Summary.ParentCollection.Records;
Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Hi Stefan,
You gave me exactly what I needed. Thank you very much!
Robert
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.