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?
Worked perfectly! Thanks again :)
Hi,
Okay, thanks for the clarification. You are correct, this would require a CreationFilter. I whipped up a quick sample for you and attached it here.
One groupbyrow with some rows as child rows, for example, and another groupbyrow with some other rows. Grouped by one column, column "Type", the first is "Type 1" and the second, "Type 2".
Those groupedbyrows have summaries at their footer (SummaryDisplayAreas.GroupByRowsFooter). Imagine that I have 10 columns, and, because of it, I have 10 summaries, one per column. So, in the second group, I want to remove 5 summaries without removing them from the first.
Is it possible? How? I imagine that it can be achieved via a Creation Filter like the other, but I can't find the parent of this summaryfootergroup. Thanks.
I'm having trouble understanding the scenario.
Xe Collons said:I have two groupedbyrows in a grid.
Do you mean you have two actual rows? Or are you talking about two levels of grouping (grouping by two different columns)?
I think it would be helpful if you posted a screen shot so I can see what the grid looks like and exactly which summaries you want to remove.
Sorry for the "upping" of this post, but I have another question:
I have two groupedbyrows in a grid. Both of them work with summaryfooters per groupbyrow. I want to remove 5 concrete summaries(from 18) from the second groupbyrow, at the bottom of all rows inside the group, without removing them on the first.
For testing purposes, I thought at first that I could remove all the SummaryFooterUIElements to try(I imagine that SummaryValues will be child of this elements), so, watching who were the parents of these elements, I arrived to the RowColRegionIntersectionUIElement. I tried to remove the SummaryFooters from these elements like this in a creationfilter:
if (parent is RowColRegionIntersectionUIElement) { SummaryFooterUIElement summaryFooterUIElement = parent.GetDescendant(typeof(SummaryFooterUIElement)) as SummaryFooterUIElement; if (null != summaryFooterUIElement) { parent.ChildElements.Remove(summaryFooterUIElement); } }
But it only removes them from the first groupbyrow. Any help? Thanks :9