バージョン

SummaryDisplayAreas 列挙体

UltraGridOverride.SummaryDisplayArea プロパティを指定する列挙体。
シンタックス
'宣言
 
Public Enum SummaryDisplayAreas 
   Inherits System.Enum
public enum SummaryDisplayAreas : System.Enum 
メンバ
メンバ解説
Bottom行コレクションの最後に集計が表示されます。
BottomFixed行コレクションの最後に集計が表示されます。ルートコレクションでは、集計が画面からスクロールアウトしないように固定されます。子行コレクションでは、Bottom と同じように動作します。
DefaultデフォルトDefault は SummarySettings.Hidden プロパティおよび SummarySettings.DisplayInGroupBy プロパティの設定に解決されます。つまり、これらのプロパティがデフォルト値のままの場合、集計は各行コレクションの最後にある集計フッターと各グループ行に (列に揃えられずに) 表示されます。
GroupByRowsFooterグループ行コレクションの集計フッターに集計が表示されます。このフラグを有効にするためには、TopTopFixedBottomBottomFixed のいずれかと結合する必要があります。
HideDataRowFootersデータ行の集計フッターを非表示にします。これは、行がグループ化されていて、グループ行に対してのみ集計フッターを表示したい場合に役立ちます。
InGroupByRows各グループ行に集計が表示されます。このプロパティは SummarySettings.DisplayInGroupBy プロパティをオーバーライドします。
None集計はどこにも表示されません。これは SummarySettings.Hidden プロパティと SummarySettings.DisplayInGroupBy プロパティをオーバーライドします。
RootRowsFootersOnlyルート行コレクション (ルートレベル) に対してのみ集計フッターを表示します。これは、行がグループ化されていて、ルートグループ行に対してのみ集計フッターを表示したい場合に役立ちます。このフラグを有効にするためには、TopTopFixedBottomBottomFixed のいずれかと結合する必要があります。行がグループ化されていない場合、このフラグは効果がありません。注意: これは InGroupByRows オプションの機能には影響しません。InGroupByRows は、このフラグの値にかかわらず同じように機能します。
Top行コレクションの先頭に集計が表示されます。
TopFixed行コレクションの先頭に集計が表示されます。ルートコレクションでは、集計が画面からスクロールアウトしないように固定されます。子行コレクションでは、Top と同じように動作します。
使用例
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;
		}
参照