バージョン

SummaryDisplayArea プロパティ

このフィールドに関連付けられた集計が表示されるかどうか、またどこに表示されるのかを指定します。Default は TopLevelOnl および InGroupByRecords に解決されます。
シンタックス
'宣言
 
Public Property SummaryDisplayArea As Nullable(Of SummaryDisplayAreas)
public Nullable<SummaryDisplayAreas> SummaryDisplayArea {get; set;}
解説

SummaryDisplayArea プロパティは、このフィールドの集計計算結果が表示されるかどうか、またどこに表示されるのかを指定します。また SummaryDefinitionSummaryDefinition.DisplayArea プロパティを設定して、個々の集計の集計表示領域を指定することもできます。

デフォルトで、このプロパティは TopLevelOnlyInGroupByRecords に解決されます。これは集計が各グループ化レコード(グループ化レコードがある場合)に、また最上位のレコードに対して表示されることを意味します。詳細については、SummaryDisplayAreas 列挙体を参照してください。

ユーザーがフィールドで集計計算を実行できるようにする UI を有効にするには、FieldSettings の AllowSummaries プロパティを設定します。詳細は AllowSummaries を参照してください。

使用例
Imports Infragistics.Windows
Imports Infragistics.Windows.Editors
Imports Infragistics.Windows.DataPresenter

    Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        ' Set the data source.
        _dp.DataSource = _dataSource

        ' SummaryDisplayArea property specifies where summaries are to be displayed. See help
        ' for SummaryDisplayAreas enum for a listing of all available options and description 
        ' of each option.
        ' 
        ' This particular setting will display summary results at bottom of records (BottomFixed)
        ' and furthermore the summary record will be fixed or non-scrolling for the root level.
        ' If there group-by records, it will display summaries in each group-by record (InGroupByRecords)
        ' and furthermore the summary record will only be displayed for the top level only 
        ' (TopLevelOnly) which is a desirable behavior because summaries of lower levels are 
        ' displayed inside each group-by record.
        ' 
        _dp.FieldSettings.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed _
                Or SummaryDisplayAreas.InGroupByRecords Or SummaryDisplayAreas.TopLevelOnly


        Dim summaryDef1 As SummaryDefinition = _dp.FieldLayouts(0).SummaryDefinitions.Add( _
            "PriceAverage", SummaryCalculator.Average, "Price")

        ' You can override where a specific summary gets displayed by using the summary 
        ' definition's DisplayArea property.
        ' 
        summaryDef1.DisplayArea = SummaryDisplayAreas.TopFixed _
            Or SummaryDisplayAreas.InGroupByRecords Or SummaryDisplayAreas.TopLevelOnly

        ' If DisplayArea is not specified, it will use the FieldSetting's SummaryDisplayArea
        ' property setting.
        ' 
        Dim summaryDef2 As SummaryDefinition = _dp.FieldLayouts(0).SummaryDefinitions.Add( _
            "PriceSum", SummaryCalculator.Sum, "Price")

    End Sub
using Infragistics.Windows;
using Infragistics.Windows.Editors;
using Infragistics.Windows.DataPresenter;

		public void Window1_Loaded( object sender, RoutedEventArgs e )
		{
			// Set the data source.
			_dp.DataSource = _dataSource;

			// SummaryDisplayArea property specifies where summaries are to be displayed. See help
			// for SummaryDisplayAreas enum for a listing of all available options and description 
			// of each option.
			// 
			// This particular setting will display summary results at bottom of records (BottomFixed)
			// and furthermore the summary record will be fixed or non-scrolling for the root level.
			// If there group-by records, it will display summaries in each group-by record (InGroupByRecords)
			// and furthermore the summary record will only be displayed for the top level only 
			// (TopLevelOnly) which is a desirable behavior because summaries of lower levels are 
			// displayed inside each group-by record.
			// 
			_dp.FieldSettings.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed
				| SummaryDisplayAreas.InGroupByRecords | SummaryDisplayAreas.TopLevelOnly;

			
			SummaryDefinition summaryDef1 = _dp.FieldLayouts[0].SummaryDefinitions.Add( 
				"PriceAverage", SummaryCalculator.Average, "Price" );
			
			// You can override where a specific summary gets displayed by using the summary 
			// definition's DisplayArea property.
			// 
			summaryDef1.DisplayArea = SummaryDisplayAreas.TopFixed
				| SummaryDisplayAreas.InGroupByRecords | SummaryDisplayAreas.TopLevelOnly;

			// If DisplayArea is not specified, it will use the FieldSetting's SummaryDisplayArea
			// property setting.
			// 
			SummaryDefinition summaryDef2 = _dp.FieldLayouts[0].SummaryDefinitions.Add(
				"PriceSum", SummaryCalculator.Sum, "Price" );
		}
        <igDP:XamDataGrid x:Name="_dp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

            
<igDP:XamDataGrid.FieldSettings>
                
<!--
                    SummaryDisplayArea property specifies where summaries are to be displayed. See help
                    for SummaryDisplayAreas enum for a listing of all available options and description 
                    of each option.
                    
                    This particular setting will display summary results at bottom of records (BottomFixed)
                    and furthermore the summary record will be fixed or non-scrolling for the root level.
                    If there group-by records, it will display summaries in each group-by record (InGroupByRecords)
                    and furthermore the summary record will only be displayed for the top level only 
                    (TopLevelOnly) which is a desirable behavior because summaries of lower levels are 
                    displayed inside each group-by record.
                
-->
                
<igDP:FieldSettings SummaryDisplayArea="BottomFixed,InGroupByRecords,TopLevelOnly" />
            
</igDP:XamDataGrid.FieldSettings>
            
            
<igDP:XamDataGrid.FieldLayouts>
                
<igDP:FieldLayout IsDefault="true" >
                    
<igDP:FieldLayout.SummaryDefinitions>
                        
<!--
                            You can override where a specific summary gets displayed by using the summary 
                            definition's DisplayArea property.
                        
-->
                        
<igDP:SummaryDefinition 
                                
Key="PriceAverage" 
                                
SourceFieldName="Price" 
                                
Calculator="Average" 
                                
DisplayArea="TopFixed,InGroupByRecords,TopLevelOnly"
                            
/>

                        
<!--
                            If DisplayArea is not specified, it will use the FieldSetting's SummaryDisplayArea
                            property setting.
                        
-->
                        
<igDP:SummaryDefinition
                                
Key="PriceSum"
                                
SourceFieldName="Price"
                                
Calculator="Sum"
                            
/>
                    
</igDP:FieldLayout.SummaryDefinitions>
                
</igDP:FieldLayout>
            
</igDP:XamDataGrid.FieldLayouts>

        
</igDP:XamDataGrid>
参照