One of the columns in SummaryBand looks like below;
12:30:14 (which means 12 hours 30 minutes 14 seconds)
11:36:45
1:22:18
The sum of the column should be 25:29:17.
I think I should set summaryType as Formula like....
summaryBand.Summaries.Add(
"TMinutes", SummaryType.Formula, summaryBand.Columns(fnMinute), SummaryPosition.UseSummaryPositionColumn)
But I have no idea how to set up the formula, can you help me?
Hi,
ICustomSummaryCalculator is pretty simple. It has three method. One for when the summary begins, so you an initialize any member variables you need - such as a running total. The another method to pass you each row in the list. And finally a method to let you know the summary calculation is complete.
There's a sample of one here: skipping over null cells for summary? - Infragistics Community
It is the String with format of hh:mm:ss.
So SUM(Column Key) would not work.
THat's why I posted this issue.
Is there any samples of to use SummaryType.Custom and create your own ICustomSummaryCalculator class which will give me a clue how to solve this issue?
What's the DataType of the column?
The formula for this would look just like the formula for any other column sum. Something like this:
"SUM([column key])"
But this will only work if the data type of the column supports the addition (+) operator. If it does not, then another option would be to use SummaryType.Custom and create your own ICustomSummaryCalculator class.