We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to calculate a group summary based on a parent group

Thread ID:





111005 Sep 3,2013 06:44 PM UTC Sep 10,2013 09:44 AM UTC WPF 1
Tags: GridControl
Asked On September 3, 2013 06:44 PM UTC


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.






Gobinath A [Syncfusion]
Replied On September 10, 2013 09:44 AM UTC

Hi Richard,

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.

Code snippet[C#]:

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.

Sample: NestedWithObserveCollection.zip


Please let us know if you have any queries.


Gobinath A


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon