Version

SummaryDisplayArea Property

Specifies if and where summaries associated with this field are displayed. Default is resolved to TopLevelOnly and InGroupByRecords.
Syntax
'Declaration
 
Public Property SummaryDisplayArea As Nullable(Of SummaryDisplayAreas)
public Nullable<SummaryDisplayAreas> SummaryDisplayArea {get; set;}
Remarks

SummaryDisplayArea property controls if and where summary calculation results for this field are displayed. You can also specify summary display area for individual summaries by setting SummaryDefinition's SummaryDefinition.DisplayArea property.

By default this property is resolved to TopLevelOnly and InGroupByRecords, which means that the summaries will be displayed in each group-by record (if there are group-by records) and for the top level records. See SummaryDisplayAreas enum for more information.

To enable the UI that lets the user select summary calculations to perform on fields, set the FieldSettings' AllowSummaries property. See AllowSummaries for more information.

Example
The following code demonstrates FieldSettings' SummaryDisplayArea and SummaryDefinition's DisplayArea properties. These two properties accomplish the same behavior except the scope is different. FieldSettings' SummaryDisplayArea property affects all the summaries associated with the field settings (if DataPresenter's FieldSettings is used, it will affect all the summaries in the control) whereas DisplayArea property of the SummaryDefinition affects only that summary. The result of the following code will be that the Average summary will be displayed on top of the record collection and the Sum summary will be displayed at the bottom of the record collection (since the Sum doesn't have its DisplayArea explicitly set, it inherits the setting from the FieldSettings' SummaryDisplayArea property setting).

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>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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