I have one Ultragrid that is groupedby using a SortedColumn, using the "ViewStyleBand.OutlookGroupBy" and the "ViewStyle.SingleBand". That gives me, 3 groups of rows, as I want.
I have 3 types of summary added to the SummaryDisplayArea property. "InGroupByRows", "GroupByRowsFooter" and "BottomFixed" for calculating the sum of all the grid.
But the problem is: I want to have independent summaries for each grouprow. With its own behavior. When I collapse a groupbyrow, I want to have the summaries in it(as the property InGroupByRows does), and when I expand the row, I want it to dissapear, so I only have the "GroupByRowsFooter" summary.
Have tried to add/remove the InGroupByRows from the SummaryDisplayArea list in the BeforeRowCollapsed/Expanded events, but, since the summaries work as a whole, when I expand a GroupByRow, for example, summaries in ALL GroupByRows are removed, when I want to remove them only in a single GroupByRow. So, if there are any GroupByRows collapsed, I can't see the summary for it.
Any suggestions?
Hi,
You are right, you won't be able to do this using any property settings on the grid, because they affect the entire band.
There might be another way to achieve this, but how you do it depends on whether you are displaying the summaries in the GroupByRow as columns or as part of the description. Are you setting GroupBySummaryDisplayStyle?
Yes, "SummaryCells".
By the way, I have seen that, if I put InGroupByRows into the SummaryDisplayAreas and if the GroupBySummaryDisplayStyle is setted as SummaryCells with no indentation for the groupbyrows (IndentationGroupByRow = 0), I can't expand or collapse GroupByRows using the Expansion Indicator. If I change GroupBySummaryDisplayStyle into Text or Default, it works as charm.
Any suggestions on this?