Version

ScrollHeaderIntoView Method

Scrolls the specified header into view for a colscrollregion.
Syntax
'Declaration
 
Public Sub ScrollHeaderIntoView( _
   ByVal header As HeaderBase, _
   ByVal leftAlign As Boolean _
) 
public void ScrollHeaderIntoView( 
   HeaderBase header,
   bool leftAlign
)

Parameters

header
The HeaderBase to scroll into view.
leftAlign
True to specify that the header should be left aligned in the ColScrollRegion
Remarks

Invoke this method to ensure that a column or group header is viewable in a column scrolling region.

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

If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated.

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

Example
Following code scrolls a column into view using ScrollHeaderIntoView method. NOTE: This does not ensure that the header is visible by scrolling vertically. It only scrolls horozontally. So if all the visible rows were from a different band than the band the header belongs to, the header won't be visible and this method will not scroll vertically to bring the header into view.

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

  Private Sub Button132_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button132.Click

      Dim column As UltraGridColumn = Me.UltraGrid1.DisplayLayout.Bands(0).Columns("Fax")

      ' Scroll the column into view by calling ScrollHeaderIntoView and passing in
      ' the column's header. You can also pass in group headers to scroll groups.
      Me.UltraGrid1.ActiveColScrollRegion.ScrollHeaderIntoView(column.Header, False)

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

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

	UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[0].Columns["Fax"];

	// Scroll the column into view by calling ScrollHeaderIntoView and passing in
	// the column's header. You can also pass in group headers to scroll groups.
	this.ultraGrid1.ActiveColScrollRegion.ScrollHeaderIntoView( column.Header, false );

}
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