Hello;
I've got a grid with a few group by's, (hierarchical, so I have goup bys within group by's) showing summary values in group by rows and after th detail in the innermost group by row set, (is that what's called a group by island?), and also as a sort of sub-total at the bottom of a set of collapsed group by's.
e.Layout.Override.SummaryDisplayArea |= SummaryDisplayAreas.InGroupByRows;
e.Layout.Override.SummaryDisplayArea |= SummaryDisplayAreas.GroupByRowsFooter;
Additionally, I get a Grand Summary row at the bottom of the grid, free of charge, not shown in the shot.
I've written creation and draw filters to remove the summary values from a goup by row when it's expanded, because the summaries also appear at the bottom of the group by island and we didn't want to see the totals twice. I also wrote a creation filter to put a summary caption in the summary row , (where we had some space), as I also set the SummaryCaptionVisible to false. (We didn't want a 2-row summary row, caption AND values beneath.)
So things are looking good, but I'm having a tough time getting rid of the last, grand summary row, a final requirement. I don't think it's possible to do that with a property and still have summary rows in the group by islands, (I think), so I looked into removing it in a creation filter. Trouble is, it's hierarchy is the same as all summary rows and I can't see how I can identify it in the filter, (or really, it's parent, when there's still time to eliminate it).
This is the hierarchy from the UIElement Viewer of the grand total summary:
UltraGridUIElement, Location = {X=0,Y=0,Width=1284,Height=559} DataAreaUIElement, Location = {X=1,Y=1,Width=1282,Height=557} RowColRegionIntersectionUIElement, Location = {X=1,Y=1,Width=1282,Height=540} SummaryFooterUIElement, Location = {X=1,Y=309,Width=1522,Height=20} FixedSummaryAreaUIElement, Location = {X=2,Y=310,Width=1520,Height=18} FixedSummaryLineUIElement, Location = {X=2,Y=310,Width=1520,Height=18}
No different from any other summary line, say one in a group by island.
Any thoughts on how to eliminate just the grand totals row?
Thanks,
Bill
Hi Bill,
If you don't want grand total summaries, then I think maybe you want to use SummaryDisplayAreas.Bottom instead of SummaryDisplayAreas.GroupByRowsFooter.
But maybe I am wrong and there is some other reason you need to use Footers. If so, then what you should do is look at the SummaryFooterUIElement.Rows collection. This will indicate the collection of rows being summarized. So you can detect the Grand total by checking to see if the rows collection's IsGroupByRowsCollection property, or examining it in more detail to see what level it's at.