Imports Infragistics.Win.UltraWinGrid
The WinGrid™ displays summaries at the bottom of the row collection by default. In addition, the summaries scroll as rows are scrolled.
This topic shows you how to fix the summaries so they don’t scroll. It also describes how to show summaries at the top of the row collection rather than at the bottom.
Before you start writing any code, you should place using/imports directives in your code-behind so you don’t need to always type out a member’s fully qualified name.
In Visual Basic:
Imports Infragistics.Win.UltraWinGrid
In C#:
using Infragistics.Win.UltraWinGrid;
Set the SummaryDisplayArea to a value that has either BottomFixed or TopFixed bit turned on. The SummaryDisplayArea property is a flagged enumeration type. You can specify multiple values by using the bitwise or operation.
In Visual Basic:
Private Sub CustomersUltraGrid_InitializeLayout(ByVal sender As System.Object, _ ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) _ Handles CustomersUltraGrid.InitializeLayout Me.CustomersUltraGrid.DisplayLayout.Override.AllowRowSummaries = _ AllowRowSummaries.True Me.CustomersUltraGrid.DisplayLayout.Override.SummaryDisplayArea = _ SummaryDisplayAreas.TopFixed End Sub
In C#:
private void customersUltraGrid_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { this.customersUltraGrid.DisplayLayout.Override.AllowRowSummaries = AllowRowSummaries.True; this.customersUltraGrid.DisplayLayout.Override.SummaryDisplayArea = SummaryDisplayAreas.TopFixed; }
The below screen shot shows an UltraGrid with fixed summaries at the top. When you scroll the rows are scrolled out of view at the top however the summary area remains visible at all times.