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