|111005||Sep 3,2013 06:44 PM UTC||Sep 10,2013 09:44 AM UTC||WPF||1|
How can I implement a custom group summary that performs a calculation based on the parent group? ISummaryAggregate's CalculateAggregateFunc() only provides the records in the current group, and there does not appear to be a way to access the parent group.
Thanks for your patience.
We can get the parent record in the following Highlighted code in the CalculateAggregateFunc() method and you have to calculate the child group record also in the below method.
public Action<System.Collections.IEnumerable, string, System.ComponentModel.PropertyDescriptor> CalculateAggregateFunc()
return (items, property, pd) =>
var enumerableItems = items as IEnumerable<Data>;
if (pd.Name == "Price")
this.Price = enumerableItems.CountTo<Data>(q => q.ProductPrice);
//We can get the child record in the below line of code
// this.ChildPrice = enumerableItems.CountToParent<Data>(q => q.Collection[i].ProductPrice);
For your reference we have attached simple sample and please find the sample under the following location.
Please let us know if you have any queries.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.