Version

ScrollRowIntoView(UltraGridRow,RowScrollRegion) Method

Scrolls the specified row into view for a rowscrollregion.
Syntax
'Declaration
 
Public Overloads Sub ScrollRowIntoView( _
   ByVal row As UltraGridRow, _
   ByVal rsr As RowScrollRegion _
) 
public void ScrollRowIntoView( 
   UltraGridRow row,
   RowScrollRegion rsr
)

Parameters

row
The row to scroll into view
rsr
The RowScrollRegion
Remarks

Invoke this method to ensure that a row is viewable in a rowscrollregion.

If the row is already in the viewable area of the row scrolling region, this method does not perform any scrolling.

If the rowscrollregion is scrolled as a result of invoking this method, the BeforeRowRegionScroll event is generated.

The Scroll and ScrollCellIntoView methods can also be invoked to scroll an object into a rowscrollregion's viewable area.

Example
Following code shows you how to scroll a row into view. It calls ScrollRowIntoView method on a row-scroll-region and on a col-scroll-region. A row-scroll-region is the one that scrolls different rows into view vertically. The reason for calling the method on a col-scroll-region is that if you had multiple bands then a row can be scrolled out of view horizontally. And therefore you need to scroll the row into view both vertically and also horizontally.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button137_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button137.Click

      ' Get the row to scroll into view.
      Dim row As UltraGridRow = Me.UltraGrid1.Rows(Me.UltraGrid1.Rows.Count - 1)

      ' Set the back color of the row so we can identify it on the screen.
      row.Appearance.BackColor = Color.LightSkyBlue

      ' Call ScrollRowIntoView on the active row-scroll-region to scroll the row into 
      ' view vertically.
      Me.UltraGrid1.ActiveRowScrollRegion.ScrollRowIntoView(row)

      ' Call the ScrollRowIntoView on the active col-scroll-region to scroll the row into view 
      ' vertically.
      Me.UltraGrid1.ActiveColScrollRegion.ScrollRowIntoView(row, Me.UltraGrid1.ActiveRowScrollRegion)

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button137_Click(object sender, System.EventArgs e)
{

	// Get the row to scroll into view.
	UltraGridRow row = this.ultraGrid1.Rows[this.ultraGrid1.Rows.Count - 1];

	// Set the back color of the row so we can identify it on the screen.
	row.Appearance.BackColor = Color.LightSkyBlue;
	
	// Call ScrollRowIntoView on the active row-scroll-region to scroll the row into 
	// view vertically.
	this.ultraGrid1.ActiveRowScrollRegion.ScrollRowIntoView( row );

	// Call the ScrollRowIntoView on the active col-scroll-region to scroll the row into view 
	// vertically.
	this.ultraGrid1.ActiveColScrollRegion.ScrollRowIntoView( row, this.ultraGrid1.ActiveRowScrollRegion );

}
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