{"id":345,"date":"2015-12-08T17:00:00","date_gmt":"2015-12-08T17:00:00","guid":{"rendered":"https:\/\/staging.infragistics.com\/blogs\/?p=345"},"modified":"2025-02-26T08:19:26","modified_gmt":"2025-02-26T08:19:26","slug":"ultrawingrid-summary-display-areas","status":"publish","type":"post","link":"https:\/\/www.infragistics.com\/blogs\/ultrawingrid-summary-display-areas","title":{"rendered":"The UltraWinGrid Summary Display Areas: When To Use It?"},"content":{"rendered":"\n<p>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;\u00a0to give you an understanding\u00a0where the summaries will be positioned.\u00a0<\/p>\n\n\n\n<p>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:&nbsp;<\/p>\n\n\n\n<p>1. At the footer of the root row collection of an ungrouped grid<br>2. At the end of each data row collection of a group-by row <br>3. At the footer of the group-by rows collection<br>4. Within each group-by row (to the right of the sorted column name)<\/p>\n\n\n\n<p>Summary Footers are displayed in the following locations:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>Default<\/b>.\n<ol class=\"wp-block-list\">\n<li>The row collections at the end of each group-by row<\/li>\n\n\n\n<li>The group-by row<\/li>\n\n\n\n<li>The root rows collection (ungrouped)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>Example 1: Grouped rows<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/static.infragistics.com\/marketing\/Blogs\/Migration\/00\/00\/00\/03\/68\/Default_Grouped.png\" alt=\" \"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>Bottom<\/b>\n<ol class=\"wp-block-list\">\n<li>The row collection at the end of each group-by row<\/li>\n\n\n\n<li>The root rows collection (ungrouped)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>Example 2: Grouped rows<\/strong><\/p>\n\n\n\n<div style=\"padding-left: 60px;\">Example 2.1: Ungrouped rows<br><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/a6WIKxz.png?1\" alt=\" \">&nbsp;<\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>BottomFixed<\/b>\n<ol class=\"wp-block-list\">\n<li>The row collections at the end of each group-by row<\/li>\n\n\n\n<li>The root rows collection (ungrouped). The summary footer is fixed so it doesn\u2019t get scrolled out of view.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>Example 3: Ungrouped<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>GroupByRowsFooter (<\/b>This flag must be combined with either\u00a0Top,\u00a0TopFixed,\u00a0Bottom\u00a0or\u00a0BottomFixed\u00a0in order for it to have any effect<b>)<\/b>\n<ol class=\"wp-block-list\">\n<li>The row collections at the end of each group-by row<\/li>\n\n\n\n<li>The summary footer of the group-by row collection<\/li>\n\n\n\n<li>The root rows collection (ungrouped)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>Example 4: Grouped rows<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/static.infragistics.com\/marketing\/Blogs\/Migration\/00\/00\/00\/03\/68\/GroupByRowsFooter.png\" alt=\" \"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>HideDataRowFooters<\/b>\n<ol class=\"wp-block-list\">\n<li>The row collections at the end of each group-by row<\/li>\n\n\n\n<li>The root row collection<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><b>InGroupByRows<\/b>\n<ol class=\"wp-block-list\">\n<li>The group-by row<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><b>RootRowsFootersOnly (<\/b>This flag must be combined with either Top,\u00a0TopFixed,\u00a0Bottom\u00a0or\u00a0BottomFixed\u00a0in order for it to have any effect. When rows are not grouped this flag has no effect.\u00a0Note\u00a0that this does not have any effect on the workings of\u00a0InGroupByRows\u00a0option.InGroupByRows\u00a0will still work the same way regardless of the value of this flag.<b>)<\/b>\n<ol class=\"wp-block-list\">\n<li>The root row collection<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>Example 5: Grouped Rows<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/static.infragistics.com\/marketing\/Blogs\/Migration\/00\/00\/00\/03\/68\/RootRowsFooterOnly.png\" alt=\" \"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>Top<\/b>\n<ol class=\"wp-block-list\">\n<li>The row collection at the beginning of each group-by row<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>Example 6: Grouped rows<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/static.infragistics.com\/marketing\/Blogs\/Migration\/00\/00\/00\/03\/68\/Top.png\" alt=\" \"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>TopFixed<\/b>\n<ol class=\"wp-block-list\">\n<li>The root rows collection (ungrouped) at the beginning. The summary footer is fixed so it doesn\u2019t get scrolled out of view.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>Example 7: Ungrouped rows<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/static.infragistics.com\/marketing\/Blogs\/Migration\/00\/00\/00\/03\/68\/TopFixed.png\" alt=\" \"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>None<\/b>\n<ol class=\"wp-block-list\">\n<li>Summaries is not displayed anywhere<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p>*Row collections of the data are treated equally. Grand Totals (ungrouped rows) and Sub-totals (set of grouped rows).<\/p>\n\n\n\n<p>You cannot hide summaries for a root row collection only you can manually toggle the \u2018Default\u2019 &amp; \u2018None\u2019 states when the grid is either grouped or ungrouped.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, handle the \u2018AfterSortChange\u2019 event on the UltraWinGrid<\/li>\n\n\n\n<li>Second, perform a check on whether any column(s) in the current band\u2019s is in the \u2018SortedColumns\u2019 collection<\/li>\n\n\n\n<li>Third, check any columns found in the \u2018SortedColumns\u2019 collection is \u2018IsGroupByColumn\u2019.<\/li>\n<\/ul>\n\n\n\n<p>Lastly, set the grid\u2019s \u2018SummaryDisplayAreas\u2019 enum to \u2018Default for each summary. *Note any summary left out and the footer will still be displayed.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">void ultraGrid1_AfterSortChange(object sender, BandEventArgs e)\n{\n           foreach (UltraGridColumn col in e.Band.SortedColumns)\n           {\n               if (col.IsGroupByColumn == true)\n               {                   \n                   ultraGrid1.DisplayLayout.Bands[0].Summaries[0].SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Default;\n               } \n               else\n               {\n                   ultraGrid1.DisplayLayout.Bands[0].Summaries[0].SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.None;                   \n               }\n           }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The UltraWinGrid provides countless invaluable\u00a0data-centric features and\u00a0can be morphed into many types of views, layouts and styles as the end-user sees fit. <\/p>\n","protected":false},"author":161,"featured_media":2369,"comment_status":"publish","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-345","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to"],"_links":{"self":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts\/345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/users\/161"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/comments?post=345"}],"version-history":[{"count":3,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts\/345\/revisions"}],"predecessor-version":[{"id":2405,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts\/345\/revisions\/2405"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/media\/2369"}],"wp:attachment":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/media?parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/categories?post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/tags?post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}