Version

SummaryDisplayAreas Enumeration

Enum for specifying UltraGridOverride.SummaryDisplayArea property.
Syntax
'Declaration
 
Public Enum SummaryDisplayAreas 
   Inherits System.Enum
public enum SummaryDisplayAreas : System.Enum 
Members
MemberDescription
BottomSummary is displayed at the end of the row collection.
BottomFixedSummary is displayed at the end of the row collection. In root row collection the summary is fixed so it doesn't get scrolled out of view. In child row collections this behaves in the same way as Bottom.
DefaultDefault. Default is resolved to the SummarySettings.Hidden and SummarySettings.DisplayInGroupBy property settings. In other words if those properties are left to their default values, then the summaries will be displayed in the summary footer at the end of each row collection and in each group-by row (not aligned to columns).
GroupByRowsFooterSummary is displayed in the summary footers of group-by row collections. This flag must be combined with either Top, TopFixed, Bottom or BottomFixed in order for it to have any effect.
HideDataRowFootersHides the summary footers of data rows. This is useful when rows are grouped and you want to show the summary footers of group-by rows only.
InGroupByRowsSummary is displayed in each group-by row. This property overrides the SummarySettings.DisplayInGroupBy property.
NoneSummary is not displayed anywhere. This overrides the SummarySettings.Hidden and SummarySettings.DisplayInGroupBy properties.
RootRowsFootersOnlyOnly displays the summary footers on the root rows collection (root level). This is useful when rows are grouped and you want to show the summary footers of the root group-by rows. 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.
TopSummary is displayed in the beginning of the row collection.
TopFixedSummary is displayed in the beginning of the row collection. In root row collection the summary is fixed so it doesn't get scrolled out of view. In child row collections this behaves in the same way as Top.
Example
Following code sets some of the row summaries functionality related properties.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

    Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
        ' To allow the user to be able to add/remove summaries set the 
        ' AllowRowSummaries property. This does not have to be set to summarize
        ' data in code.
        e.Layout.Override.AllowRowSummaries = AllowRowSummaries.True

        ' Here is how you can add summary of a column in code. The retruned 
        ' SummarySettings object has properties for specifying the appearance,
        ' visibility and where it's displayed among other things.
        Dim columnToSummarize As UltraGridColumn = e.Layout.Bands(0).Columns("Total")
        Dim summary As SummarySettings = e.Layout.Bands(0).Summaries.Add("GrandTotal", SummaryType.Sum, columnToSummarize)
        summary.DisplayFormat = "Total = {0:c}"
        summary.Appearance.TextHAlign = HAlign.Right

        ' To display summary footer on the top of the row collections set the 
        ' SummaryDisplayArea property to a value that has the Top or TopFixed flag
        ' set. TopFixed will make the summary fixed (non-scrolling). Note that 
        ' summaries are not fixed in the child rows. TopFixed setting behaves
        ' the same way as Top in child rows. Default is resolved to Bottom (and
        ' InGroupByRows more about which follows).
        e.Layout.Override.SummaryDisplayArea = SummaryDisplayAreas.TopFixed

        ' By default UltraGrid does not display summary footers or headers of
        ' group-by row islands. To display summary footers or headers of group-by row
        ' islands set the SummaryDisplayArea to a value that has GroupByRowsFooter
        ' flag set.
        e.Layout.Override.SummaryDisplayArea = e.Layout.Override.SummaryDisplayArea Or SummaryDisplayAreas.GroupByRowsFooter

        ' If you want to to display summaries of child rows in each group-by row
        ' set the SummaryDisplayArea to a value that has SummaryDisplayArea flag
        ' set. If SummaryDisplayArea is left to Default then the UltraGrid by
        ' default displays summaries in group-by rows.
        e.Layout.Override.SummaryDisplayArea = e.Layout.Override.SummaryDisplayArea Or SummaryDisplayAreas.InGroupByRows

        ' SummaryDisplayArea property is expossed on the SummarySettings object as
        ' well allowing to control if and where the summary gets displayed on a
        ' per summary basis.
        summary.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed _
                                        Or SummaryDisplayAreas.GroupByRowsFooter

        ' By default any summaries to be displayed in the group-by rows are displayed
        ' as text appended to the group-by row's description. You can set the 
        ' GroupBySummaryDisplayStyle property to SummaryCells or 
        ' SummaryCellsAlwaysBelowDescription to display summary values as a separate
        ' ui element (cell like element with border, to which the summary value related
        ' appearances are applied). Default value of GroupBySummaryDisplayStyle is resolved
        ' to Text.
        e.Layout.Override.GroupBySummaryDisplayStyle = GroupBySummaryDisplayStyle.SummaryCells

        ' Appearance of the summary area can be controlled using the 
        ' SummaryFooterAppearance. Even though the property's name contains the
        ' word 'footer', this appearance applies to summary area that is displayed
        ' on top as well (summary headers).
        e.Layout.Override.SummaryFooterAppearance.BackColor = SystemColors.Info

        ' Appearance of summary values can be controlled using the 
        ' SummaryValueAppearance property.
        e.Layout.Override.SummaryValueAppearance.BackColor = SystemColors.Window
        e.Layout.Override.SummaryValueAppearance.FontData.Bold = DefaultableBoolean.True

        ' Appearance of summary values that are displayed inside of group-by rows can 
        ' be controlled using the GroupBySummaryValueAppearance property. Note that
        ' this has effect only when the GroupBySummaryDisplayStyle is set to SummaryCells
        ' or SummaryCellsAlwaysBelowDescription.
        e.Layout.Override.GroupBySummaryValueAppearance.BackColor = SystemColors.Window
        e.Layout.Override.GroupBySummaryValueAppearance.TextHAlign = HAlign.Right

        ' Caption of the summary area can be set using the SummaryFooterCaption
        ' proeprty of the band.
        e.Layout.Bands(0).SummaryFooterCaption = "Grand Totals:"

        ' Caption's appearance can be controlled using the SummaryFooterCaptionAppearance
        ' property.
        e.Layout.Override.SummaryFooterCaptionAppearance.FontData.Bold = DefaultableBoolean.True

        ' By default summary footer caption is visible. You can hide it using the
        ' SummaryFooterCaptionVisible property.
        e.Layout.Override.SummaryFooterCaptionVisible = DefaultableBoolean.False

        ' SummaryFooterSpacingAfter and SummaryFooterSpacingBefore properties can be used
        ' to leave spacing before and after the summary footer.
        e.Layout.Override.SummaryFooterSpacingAfter = 5
        e.Layout.Override.SummaryFooterSpacingBefore = 5
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void UltraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
		{
			// To allow the user to be able to add/remove summaries set the 
			// AllowRowSummaries property. This does not have to be set to summarize
			// data in code.
			e.Layout.Override.AllowRowSummaries = AllowRowSummaries.True;

			// Here is how you can add summary of a column in code. The retruned 
			// SummarySettings object has properties for specifying the appearance,
			// visibility and where it's displayed among other things.
			UltraGridColumn columnToSummarize = e.Layout.Bands[0].Columns["Total"];
			SummarySettings summary = e.Layout.Bands[0].Summaries.Add( "GrandTotal", SummaryType.Sum, columnToSummarize );
			summary.DisplayFormat = "Total = {0:c}";
			summary.Appearance.TextHAlign = HAlign.Right;

			// To display summary footer on the top of the row collections set the 
			// SummaryDisplayArea property to a value that has the Top or TopFixed flag
			// set. TopFixed will make the summary fixed (non-scrolling). Note that 
			// summaries are not fixed in the child rows. TopFixed setting behaves
			// the same way as Top in child rows. Default is resolved to Bottom (and
			// InGroupByRows more about which follows).
			e.Layout.Override.SummaryDisplayArea = SummaryDisplayAreas.TopFixed;

			// By default UltraGrid does not display summary footers or headers of
			// group-by row islands. To display summary footers or headers of group-by row
			// islands set the SummaryDisplayArea to a value that has GroupByRowsFooter
			// flag set.
			e.Layout.Override.SummaryDisplayArea |= SummaryDisplayAreas.GroupByRowsFooter;

			// If you want to to display summaries of child rows in each group-by row
			// set the SummaryDisplayArea to a value that has SummaryDisplayArea flag
			// set. If SummaryDisplayArea is left to Default then the UltraGrid by
			// default displays summaries in group-by rows.
			e.Layout.Override.SummaryDisplayArea |= SummaryDisplayAreas.InGroupByRows;

			// SummaryDisplayArea property is expossed on the SummarySettings object as
			// well allowing to control if and where the summary gets displayed on a
			// per summary basis.
			summary.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed 
				| SummaryDisplayAreas.GroupByRowsFooter;

			// By default any summaries to be displayed in the group-by rows are displayed
			// as text appended to the group-by row's description. You can set the 
			// GroupBySummaryDisplayStyle property to SummaryCells or 
			// SummaryCellsAlwaysBelowDescription to display summary values as a separate
			// ui element (cell like element with border, to which the summary value related
			// appearances are applied). Default value of GroupBySummaryDisplayStyle is resolved
			// to Text.
			e.Layout.Override.GroupBySummaryDisplayStyle = GroupBySummaryDisplayStyle.SummaryCells;

			// Appearance of the summary area can be controlled using the 
			// SummaryFooterAppearance. Even though the property's name contains the
			// word 'footer', this appearance applies to summary area that is displayed
			// on top as well (summary headers).
			e.Layout.Override.SummaryFooterAppearance.BackColor = SystemColors.Info;

			// Appearance of summary values can be controlled using the 
			// SummaryValueAppearance property.
			e.Layout.Override.SummaryValueAppearance.BackColor = SystemColors.Window;
			e.Layout.Override.SummaryValueAppearance.FontData.Bold = DefaultableBoolean.True;

			// Appearance of summary values that are displayed inside of group-by rows can 
			// be controlled using the GroupBySummaryValueAppearance property. Note that
			// this has effect only when the GroupBySummaryDisplayStyle is set to SummaryCells
			// or SummaryCellsAlwaysBelowDescription.
			e.Layout.Override.GroupBySummaryValueAppearance.BackColor = SystemColors.Window;
			e.Layout.Override.GroupBySummaryValueAppearance.TextHAlign = HAlign.Right;

			// Caption of the summary area can be set using the SummaryFooterCaption
			// proeprty of the band.
			e.Layout.Bands[0].SummaryFooterCaption = "Grand Totals:";

			// Caption's appearance can be controlled using the SummaryFooterCaptionAppearance
			// property.
			e.Layout.Override.SummaryFooterCaptionAppearance.FontData.Bold = DefaultableBoolean.True;

			// By default summary footer caption is visible. You can hide it using the
			// SummaryFooterCaptionVisible property.
			e.Layout.Override.SummaryFooterCaptionVisible = DefaultableBoolean.False;

			// SummaryFooterSpacingAfter and SummaryFooterSpacingBefore properties can be used
			// to leave spacing before and after the summary footer.
			e.Layout.Override.SummaryFooterSpacingAfter = 5;
			e.Layout.Override.SummaryFooterSpacingBefore = 5;
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also