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

GridTableSummaryRow - Sum only positive values

Thread ID:





123356 Mar 9,2016 08:10 PM UTC Mar 10,2016 01:55 PM UTC WPF 1
Tags: SfDataGrid
Asked On March 9, 2016 08:10 PM UTC


If there a way to only display the sum of positive values in the GridTableSummaryRow  ?


Gnanasownthari Thirugnanam [Syncfusion]
Replied On March 10, 2016 01:55 PM UTC

Hi Marquant,

We are analyzed your query. And you can achieve your requirement “only display the sum of positive values in GridTableSummaryRow” by using the CustomAgreegate like the below code example.


class CustomAggregate:ISummaryAggregate


        public CustomAggregate()



        public double PositiveSummation { get; set; }

        public Action<System.Collections.IEnumerable, string, System.ComponentModel.PropertyDescriptor> CalculateAggregateFunc()


            return (items, property, pd) =>


                var enumerableItems = items as IEnumerable<OrderInfo>;

               foreach(var item in enumerableItems)




                       this.PositiveSummation += item.Discount;




We have prepared a sample as per your requirement and you can download the same from the below location,

Sample : http://www.syncfusion.com/downloads/support/forum/123356/ze/Summaries571578970

Please refer the below UG link to know more about the Custom Summaries,

Link : http://help.syncfusion.com/wpf/sfdatagrid/summaries


Gnanasownthari T.


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