Version

ScrollBounds Property

Specifies the vertical scrolling behavior in regard to how the UltraGrid scrolls rows. Default is ScrollToLastItem.
Syntax
'Declaration
 
Public Property ScrollBounds As ScrollBounds
public ScrollBounds ScrollBounds {get; set;}
Remarks

Setting ScrollBounds to ScrollToFill will disallow the user from scrolling further down once the last row becomes visible. While setting it to ScrollToLastItem will allow the user to continue scrolling until last row is the only visible row in the row scroll region.

Example
Following code sets the ScrollBounds and ScrollStyle properties to alter the default vertical scrolling behavior of the UltraGrid in two ways.

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

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