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.
Unfortunately, activation email could not send to your email. Please try again.

Calculating Difference/Ratio Between Two Summary Columns - but not summing

Thread ID:

Created:

Updated:

Platform:

Replies:

35022 Sep 21,2005 06:25 AM Sep 22,2005 07:13 PM Windows Forms 1
loading
Tags: Grouping
Jason Hales
Asked On September 21, 2005 06:25 AM

Hi, I just need a quick sanity check. My GroupingGrid needs to show the difference between two double cols, eg Col1 and Col2. I don''t actually need to show the record values - just the overal group totals. I started out using a DataColumn with an expression but this just summed up the values Should I use a Custom Summary derived from SummaryBase to keep a running total of Col1 and Col2 and then return a final value or is it more efficient to get into the TableControlPrepareViewStyleInfo (or similar event) and directly calculate the difference there Thanks, as usual :-) Jason

Administrator [Syncfusion]
Replied On September 22, 2005 07:13 PM

Jason, The easiest would be to add an expression column that does the diffenerence. You can sum up that column and hide it from the displayed columns and reference it only in your group caption. If totals for the columns are already generated then it would be slightly more efficient to handle QueryCellStyleInfo and do the calcuation there for the group caption only. But it will only be minor performnace gains. Stefan >Hi, > >I just need a quick sanity check. My GroupingGrid needs to show the difference between two double cols, eg Col1 and Col2. > >I don''t actually need to show the record values - just the overal group totals. I started out using a DataColumn with an expression but this just summed up the values > >Should I use a Custom Summary derived from SummaryBase to keep a running total of Col1 and Col2 and then return a final value or is it more efficient to get into the TableControlPrepareViewStyleInfo (or similar event) and directly calculate the difference there > >Thanks, as usual :-) > >Jason

CONFIRMATION

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.

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.

;