Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
430
Summary footer row that calculates all columns while having a group by
posted

I have a grid that im feeding from an object. Forcing a group by based on an Id. The child rows are being summarized in the group by row.

What i need to do now is at the bottom of the grid create a fixed row that holds The totals of the columns as if they were not grouped or the total of all the summaries displayed in the groupby rows as it should yield the same number either way.

Halp?

 

 

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    You can do this using the SummaryDisplayArea property on the override. This is a flagged enum that allows you to specify where the summaries appear. So in this case, you want a summary that is BottomFixed so it shows a grand total. Something like this:


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                UltraGridLayout layout = e.Layout;
                UltraGridBand band = layout.Bands[0];
                UltraGridOverride ov = layout.Override;

                layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy;
                band.SortedColumns.Add("Boolean 1", false, true);

                band.Summaries.Add(SummaryType.Sum, band.Columns["Int32 1"]);

                ov.SummaryDisplayArea = SummaryDisplayAreas.InGroupByRows | SummaryDisplayAreas.BottomFixed | SummaryDisplayAreas.RootRowsFootersOnly;
            }

Reply Children