バージョン

GetRowEnumerator メソッド (RowsCollection)

この行のコレクション、そしてlowestLevelBandにまで子孫行のコレクションに関連付けられた行を取得します。
シンタックス
'宣言
 
Public Function GetRowEnumerator( _
   ByVal rowTypes As GridRowType, _
   ByVal bandToMatch As UltraGridBand, _
   ByVal lowestLevelBand As UltraGridBand _
) As IEnumerable
public IEnumerable GetRowEnumerator( 
   GridRowType rowTypes,
   UltraGridBand bandToMatch,
   UltraGridBand lowestLevelBand
)

パラメータ

rowTypes
データ行またはグループ行、またはその両方を取得するかどうか。
bandToMatch
このパラメーターがnullでない場合、このバンドのみの行が返されます。nullの場合、すべてのバンドからの行が返されます。
lowestLevelBand
このパラメーターがnullでない場合、バンドからlowestLevelBand(包括的)までの行が返されます。bandToMatchが null 以外に指定されている場合、これは無視されます。

戻り値の型

行を列挙するために使用できるIEnumerableインスタンスを返します。行をトラバースするために各ループに対してを使用できることに注意してください。
使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

' Row Types indicates which types of rows are enumerated: Data rows, GroupBy rows, or both. 
' In this case, return both. 
Dim rowTypes As GridRowType = GridRowType.DataRow Or GridRowType.GroupByRow

' Get a Row Enumerator that will return all rows in the entire grid.
' This includes all rows in the root band as well as all child bands down
' to the lowest level. 
Dim enumerator As IEnumerable = Me.ultraGrid1.Rows.GetRowEnumerator(rowTypes, Nothing, Nothing)
Dim row As UltraGridRow
For Each row In enumerator
    ' Since this enumerator can return Data rows or GroupBy rows, 
    ' check IsGroupByRow to determine which one we are dealing with.
    If (row.IsGroupByRow) Then
Debug.WriteLine(row.Description)
    Else
Debug.WriteLine(row.Cells(0).Value)
    End If
Next
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;

// Row Types indicates which types of rows are enumerated: Data rows, GroupBy rows, or both. 
// In this case, return both. 
GridRowType rowTypes = GridRowType.DataRow | GridRowType.GroupByRow;

// Get a Row Enumerator that will return all rows in the entire grid.
// This includes all rows in the root band as well as all child bands down
// to the lowest level. 
IEnumerable enumerator = this.ultraGrid1.Rows.GetRowEnumerator(rowTypes, null, null);
foreach (UltraGridRow row in enumerator)
{
	// Since this enumerator can return Data rows or GroupBy rows, 
	// check IsGroupByRow to determine which one we are dealing with.
	if (row.IsGroupByRow)
		Debug.WriteLine(row.Description);
	else
		Debug.WriteLine(row.Cells[0].Value);
}
参照