Log in to like this post! The UltraWinGrid’s Summary Display Areas - When to use them effectively Michael DiFilippo / Tuesday, December 8, 2015 The UltraWinGrid provides countless invaluable data-centric features and can be morphed into many types of views, layouts and styles as the end-user sees fit. When summarizing columns you have the ability to display the results in quite a few places. This article will list and illustrate the different display areas for when the grid is grouped and not grouped; to give you an understanding where the summaries will be positioned. The SummaryDisplayAreas property can be easily defined as a flagged enum for specifying where you need to position the summaries, in multiple locations simultaneously. There are only four possible locations for placement: 1. At the footer of the root row collection of an ungrouped grid2. At the end of each data row collection of a group-by row 3. At the footer of the group-by rows collection4. Within each group-by row (to the right of the sorted column name) Summary Footers are displayed in the following locations: Default. The row collections at the end of each group-by row The group-by row The root rows collection (ungrouped) Example 1: Grouped rows Bottom The row collection at the end of each group-by row The root rows collection (ungrouped) Example 2: Grouped rows Example 2.1: Ungrouped rows BottomFixed The row collections at the end of each group-by row The root rows collection (ungrouped). The summary footer is fixed so it doesn’t get scrolled out of view. Example 3: Ungrouped GroupByRowsFooter (This flag must be combined with either Top, TopFixed, Bottom or BottomFixed in order for it to have any effect) The row collections at the end of each group-by row The summary footer of the group-by row collection The root rows collection (ungrouped) Example 4: Grouped rows HideDataRowFooters The row collections at the end of each group-by row The root row collection InGroupByRows The group-by row RootRowsFootersOnly (This flag must be combined with either Top, TopFixed, Bottom or BottomFixed in order for it to have any effect. When rows are not grouped this flag has no effect. Note that this does not have any effect on the workings of InGroupByRows option.InGroupByRows will still work the same way regardless of the value of this flag.) The root row collection Example 5: Grouped Rows Top The row collection at the beginning of each group-by row Example 6: Grouped rows TopFixed The root rows collection (ungrouped) at the beginning. The summary footer is fixed so it doesn’t get scrolled out of view. Example 7: Ungrouped rows None Summaries is not displayed anywhere *Row collections of the data are treated equally. Grand Totals (ungrouped rows) and Sub-totals (set of grouped rows). You cannot hide summaries for a root row collection only you can manually toggle the ‘Default’ & ‘None’ states when the grid is either grouped or ungrouped. First, handle the ‘AfterSortChange’ event on the UltraWinGrid Second, perform a check on whether any column(s) in the current band’s is in the ‘SortedColumns’ collection Third, check any columns found in the ‘SortedColumns’ collection is ‘IsGroupByColumn’. Lastly, set the grid’s ‘SummaryDisplayAreas’ enum to ‘Default for each summary. *Note any summary left out and the footer will still be displayed. void ultraGrid1_AfterSortChange(object sender, BandEventArgs e) { foreach (UltraGridColumn col in e.Band.SortedColumns) { if (col.IsGroupByColumn == true) { ultraGrid1.DisplayLayout.Bands[0].Summaries[0].SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Default; } else { ultraGrid1.DisplayLayout.Bands[0].Summaries[0].SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.None; } } }