I have a grid that has two summary objects. I would like to hide one of these summaries once the grid is grouped on a field (or combintation of fields), and leave the other summary on the grid. Then if the grid is ungrouped show both summaries again.
Is there a way to do this in code, such as in the InitializeGroupByRow event?
Thank you,
T.J.
Hi T.J.,
I beleive SummarySettings has a Visible or hidden property. So hiding the summaries should be easy enough. The tricky part is where to do it. The event you want to use may not be obvious, but grouping is tightly tied to sorting. So the event you want is BeforeSortChange (or maybe AfterSortChange). You can loop through the SortedColumns collection inside this event and check for columns that have IsGroupByColumn set to true to determine if any columns are grouped.
Hi Mike,
unfortunately the SummarySettings hasn't got a Visible or Hidden property. I tried the event "private void gridReport_SummaryValueChanged(object sender, SummaryValueChangedEventArgs e)"
But here again, no possibility to hide a summary.
Have I overlooked something Please help. Thank you!