バージョン

ScrollGroupIntoView(UltraGridGroup) メソッド

指定したグループを、列スクロール領域の表示可能領域にスクロールします。
シンタックス
'宣言
 
Public Overloads Sub ScrollGroupIntoView( _
   ByVal group As UltraGridGroup _
) 
public void ScrollGroupIntoView( 
   UltraGridGroup group
)

パラメータ

group
スクロールして表示するグループ。
解説

このメソッドを起動して、列のスクロール領域でグループが表示可能であることを保証します。列のスクロール領域の表示可能な領域にすでにグループがある場合、このメソッドはスクロールを実行しません。

このメソッドの起動で列のスクロール領域がスクロールされると、列のスクロール領域の Position プロパティの値は変更され、BeforeColRegionScroll イベントが生成されます。

ScrollScrollCellIntoViewScrollColIntoView および ScrollHeaderIntoView メソッドは、列のスクロール領域の表示可能な領域にオブジェクトをスクロールするために起動することもできます。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button28_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button28.Click

      ' Following code shows how to create groups in the UltraGrid. It creates two 
      ' groups in the first band.

      ' Get the band to have the groups in.
      Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(0)

      ' Clear existing groups if any.
      band.Groups.Clear()

      ' Add two groups with two different keys. First arguement to the Add call is
      ' the key and the second arguement is the caption of the group.
      band.Groups.Add("G1", "Address Info")
      band.Groups.Add("G2", "Contact Info")

      ' Add some columns to group1
      band.Groups("G1").Columns.Add(band.Columns("CustomerID"), 0)
      band.Groups("G1").Columns.Add(band.Columns("ContactName"), 1)
      band.Groups("G1").Columns.Add(band.Columns("City"), 2)
      band.Groups("G1").Columns.Add(band.Columns("Region"), 3)
      band.Groups("G1").Columns.Add(band.Columns("Country"), 4)

      ' Add Fax and Phone columns to group2..
      band.Groups("G2").Columns.Add(band.Columns("Fax"), 0)
      band.Groups("G2").Columns.Add(band.Columns("Phone"), 0)

  End Sub

  Private Sub Button42_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button42.Click

      ' Following code shows how to scoll a group into view.

      Dim group As UltraGridGroup = Me.UltraGrid1.DisplayLayout.Bands(0).Groups("G2")

      ' Scroll the group into view. Pass in true for leftAlign to scroll the group
      ' to the left as much as possible. There is an overload of ScrollGroupIntoView
      ' that doesn't take this parameter. This overload does not left-align the
      ' group. It scrolls only as much as needed to ensure that the group is fully
      ' visible.
      Me.UltraGrid1.ActiveColScrollRegion.ScrollGroupIntoView(group, True)

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

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

	// Following code shows how to create groups in the UltraGrid. It creates two 
	// groups in the first band.

	// Get the band to have the groups in.
	UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
	 		
	// Clear existing groups if any.
	band.Groups.Clear( );
	 	
	// Add two groups with two different keys. First arguement to the Add call is
	// the key and the second arguement is the caption of the group.
	band.Groups.Add( "G1", "Address Info" );
	band.Groups.Add( "G2", "Contact Info" );
 
	// Add some columns to group1
	band.Groups["G1"].Columns.Add( band.Columns["CustomerID"],    0 );
	band.Groups["G1"].Columns.Add(  band.Columns["ContactName"],  1 );
	band.Groups["G1"].Columns.Add( band.Columns["City"],          2 );
	band.Groups["G1"].Columns.Add( band.Columns["Region"],        3 );
	band.Groups["G1"].Columns.Add( band.Columns["Country"],       4 );
	 
	// Add Fax and Phone columns to group2..
	band.Groups["G2"].Columns.Add( band.Columns["Fax"],		   0 );
	band.Groups["G2"].Columns.Add( band.Columns["Phone"],	   0 );

}

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

	// Following code shows how to scoll a group into view.

	UltraGridGroup group = this.ultraGrid1.DisplayLayout.Bands[0].Groups["G2"];

	// Scroll the group into view. Pass in true for leftAlign to scroll the group
	// to the left as much as possible. There is an overload of ScrollGroupIntoView
	// that doesn't take this parameter. This overload does not left-align the
	// group. It scrolls only as much as needed to ensure that the group is fully
	// visible.
	this.ultraGrid1.ActiveColScrollRegion.ScrollGroupIntoView( group, true );			

}
参照