Specifies the vertical scrolling behavior in regard to how the UltraGrid scrolls rows. Default is
ScrollToLastItem.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property ScrollBounds As ScrollBounds |
Example
Following code sets the ScrollBounds and ScrollStyle properties to alter the default vertical scrolling behavior of the UltraGrid in two ways.
| Visual Basic | Copy Code |
|---|
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
' Set the ScrollStyle to immediate so that the UltraGrid scrolls the rows
' while the user drags the thumb. By default, UltraGrid displays a tooltip
' and scrolls the rows when the user releases the thumb.
e.Layout.ScrollStyle = ScrollStyle.Immediate
' Se the ScrollBounds to ScrollToFill so that the UltraGrid stops scrolling
' once the last visible row is fully visible. By default UltraGrid will
' continue scrolling until only a single row is visible.
e.Layout.ScrollBounds = ScrollBounds.ScrollToFill
End Sub |
| C# | Copy Code |
|---|
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
// Set the ScrollStyle to immediate so that the UltraGrid scrolls the rows
// while the user drags the thumb. By default, UltraGrid displays a tooltip
// and scrolls the rows when the user releases the thumb.
e.Layout.ScrollStyle = ScrollStyle.Immediate;
// Se the ScrollBounds to ScrollToFill so that the UltraGrid stops scrolling
// once the last visible row is fully visible. By default UltraGrid will
// continue scrolling until only a single row is visible.
e.Layout.ScrollBounds = ScrollBounds.ScrollToFill;
} |
Remarks
See Also