I need to calculate a rollup of dollars where we show parent/child in a grid. When we calculate a summary, we cannot SUM the children again because that'll duplicate the values.
How do I get the context of the rows that are being summed so I know whether or not to include that value? I need to sum all parents and exclude all children.
The current method only provides the values of all records. Even if I grab the datasource of the grid, the method doesn't provide the current column its calculating.
Looking at the attachment:
1. Expanded grid contains parent and child records. The data itself has flags indicating whether its a parent or child.
2. The summary total sums up the columns correctly when its collapsed. (Shaded GREEN)
3. The summary totals duplicates that parent's children when its expanded. (Shaded RED)
How do I have the context of the record in the summaries so I can correctly sum up the values? I tried hooking into the summariesCalculated method but I do not see a clean way to retrieve the HTML object to replace the value. How can I cleanly get this?