バージョン

ActiveColScrollRegion プロパティ

アクティブなColScrollRegionオブジェクトを設定します。このプロパティは設計時には使用できません。
シンタックス
'宣言
 
Public Property ActiveColScrollRegion As ColScrollRegion
public ColScrollRegion ActiveColScrollRegion {get; set;}
解説

ActiveColScrollRegion プロパティは、現在アクティブな ColScrollRegion オブジェクトを決定するために使用します。ColScrollRegion オブジェクトを ActiveColScrollRegion プロパティに割り当てると、それがアクティブな列スクロール領域になります。

一度にアクティブになる列スクロール領域は 1 つだけです。アクティブな列スクロールリージョンとは、キーボード移動フォーカスがある列スクロールリージョンのことです。たとえば、左右の矢印キーを使用して列をスクロールする場合、ActiveColScrollRegion によって指定される列スクロール領域の列が移動します。

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

   Private Sub Button56_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button56.Click

       ' Get the cell you want to get the location of.
       Dim cell As UltraGridCell = Me.UltraGrid1.ActiveCell

       If Not Nothing Is cell Then
           ' If there are multiple scroll regions, then we have to specify which scroll region to
           ' get the ui element in. A cell could be visible in multiple places if you had split the
           ' grid in two or more scroll regions. Intersection of ActiveRowScrollRegion and the 
           ' ActiveColScrollRegion make up the active scroll region which is where the edit control
           ' would be positioned by the UltraGrid for editing the cell's contents if the cell were
           ' in edit mode.
           Dim rsr As RowScrollRegion = Me.ultraGrid1.ActiveRowScrollRegion
           Dim csr As ColScrollRegion = Me.ultraGrid1.ActiveColScrollRegion

           Dim contexts As Object() = New Object() {rsr, csr, cell}

           ' Get the ui element associated with the cell.
           Dim cellElem As CellUIElement = DirectCast(Me.ultraGrid1.DisplayLayout.UIElement.GetDescendant(GetType(CellUIElement), contexts), CellUIElement)

           If Not Nothing Is cellElem Then
               ' Write out the cell's location in the UltraGrid.
               Dim cellBounds As Rectangle = cellElem.Rect
               Debug.WriteLine("Cell's bounds in the UltraGrid are " & cellBounds.ToString())
           Else
               ' If there is no ui element associated with the cell, then the cell is not visible.
               Debug.WriteLine("Cell is not visible in the UltraGrid.")
           End If
       Else
           Debug.WriteLine("There is no active cell.")
       End If

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

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

	// Get the cell you want to get the location of.
	UltraGridCell cell = this.ultraGrid1.ActiveCell;
	
	if ( null != cell )
	{
		// If there are multiple scroll regions, then we have to specify which scroll region to
		// get the ui element in. A cell could be visible in multiple places if you had split the
		// grid in two or more scroll regions. Intersection of ActiveRowScrollRegion and the 
		// ActiveColScrollRegion make up the active scroll region which is where the edit control
		// would be positioned by the UltraGrid for editing the cell's contents if the cell were
		// in edit mode.
		RowScrollRegion rsr = this.ultraGrid1.ActiveRowScrollRegion;
		ColScrollRegion csr = this.ultraGrid1.ActiveColScrollRegion;

		object[] contexts = new object[] { rsr, csr, cell };

		// Get the ui element associated with the cell.
		CellUIElement cellElem = (CellUIElement)this.ultraGrid1.DisplayLayout.UIElement.GetDescendant( typeof( CellUIElement ), contexts );

		if ( null != cellElem )
		{
			// Write out the cell's location in the UltraGrid.
			Rectangle cellBounds = cellElem.Rect;
			Debug.WriteLine( "Cell's bounds in the UltraGrid are " + cellBounds.ToString( ) );
		}
		else
		{
			// If there is no ui element associated with the cell, then the cell is not visible.
			Debug.WriteLine( "Cell is not visible in the UltraGrid." );
		}
	}
	else
	{
		Debug.WriteLine( "There is no active cell." );
	}

}
参照