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.
Oops, sorry about that. Actually, I think this has come up before. I'm not sure why the SummarySettings don't have a Hidden property. So I guess the only way to do it would be to remove the SummarySettings and re-add it.
You should probably submit a feature request to Infragistics to add a Hidden property to the SummarySettings, too. Request a Feature or Component
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!
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.