Version

GetRowEnumerator Method (UltraGridBand)

Gets the rows associated with this band.
Syntax
'Declaration
 
Public Function GetRowEnumerator( _
   ByVal rowTypes As GridRowType _
) As IEnumerable
public IEnumerable GetRowEnumerator( 
   GridRowType rowTypes
)

Parameters

rowTypes
Whether to get data rows or group-by rows or both.

Return Value

Returns an IEnumerable instance that can be used to enumerate all the rows associated with this band.
Example
The following code will get an enumerator that will loop through every row in Band 1 of the grid. This will span across multiple islands groupings, but no GroupBy rows will be returned.

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 only Data rows. GroupBy rows will be skipped.
Dim rowTypes As GridRowType = GridRowType.DataRow

' Get a Row Enumerator that will return all rows in the 
' first child band.
' Note that this will not just return a single island of data. 
' It will get every row in the child band. This means the child of 
' every row in it's direct parent band.
Dim band As UltraGridBand = Me.ultraGrid1.DisplayLayout.Bands(1)
Dim enumerator As IEnumerable = band.GetRowEnumerator(rowTypes)

Dim row As UltraGridRow
For Each row In enumerator
    ' Since this enumerator will only return data rows, we can 
    ' assume each row will have at least one cell. 
    Debug.WriteLine(row.Cells(0).Value)
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 only Data rows. GroupBy rows will be skipped.
GridRowType rowTypes = GridRowType.DataRow;		

// Get a Row Enumerator that will return all rows in the 
// first child band.
// Note that this will not just return a single island of data. 
// It will get every row in the child band. This means the child of 
// every row in it's direct parent band.
UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[1];
IEnumerable enumerator = band.GetRowEnumerator(rowTypes);

foreach (UltraGridRow row in enumerator)
{	
	// Since this enumerator will only return data rows, we can 
	// assume each row will have at least one cell. 
	Debug.WriteLine(row.Cells[0].Value);
}
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