Returns a Boolean expression indicating whether a row has a sibling row below it.
Following code shows how to loop through rows using GetSibling, HasNextSibling and HasPrevSibling methods.
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics
Private Sub Button72_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button72.Click
' Following code loops throug all the top level rows in the UltraGrid.
' It prints out the row indexes for illustration purposes.
' Get the first row in the UltraGrid.
Dim row As UltraGridRow = Me.ultraGrid1.GetRow(ChildRow.First)
' Write the index of the row.
Debug.WriteLine("" & row.Index)
While row.HasNextSibling(True, False)
row = row.GetSibling(SiblingRow.Next, True, False)
' Write the index of the row.
Debug.WriteLine("" & row.Index)
End While
End Sub
Private Sub Button73_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button73.Click
' Following code loops throug all the top level rows in the UltraGrid backwards.
' It prints out the row indexes for illustration purposes.
' Get the last row in the UltraGrid.
Dim row As UltraGridRow = Me.ultraGrid1.GetRow(ChildRow.Last)
' Write the index of the row.
Debug.WriteLine("" & row.Index)
While row.HasPrevSibling(True, False)
row = row.GetSibling(SiblingRow.Previous, True, False)
' Write the index of the row.
Debug.WriteLine("" & row.Index)
End While
End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
private void button72_Click(object sender, System.EventArgs e)
{
// Following code loops throug all the top level rows in the UltraGrid.
// It prints out the row indexes for illustration purposes.
// Get the first row in the UltraGrid.
UltraGridRow row = this.ultraGrid1.GetRow( ChildRow.First );
// Write the index of the row.
Debug.WriteLine( "" + row.Index );
while ( row.HasNextSibling( true, false ) )
{
row = row.GetSibling( SiblingRow.Next, true, false );
// Write the index of the row.
Debug.WriteLine( "" + row.Index );
}
}
private void button73_Click(object sender, System.EventArgs e)
{
// Following code loops throug all the top level rows in the UltraGrid backwards.
// It prints out the row indexes for illustration purposes.
// Get the last row in the UltraGrid.
UltraGridRow row = this.ultraGrid1.GetRow( ChildRow.Last );
// Write the index of the row.
Debug.WriteLine( "" + row.Index );
while ( row.HasPrevSibling( true, false ) )
{
row = row.GetSibling( SiblingRow.Previous, true, false );
// Write the index of the row.
Debug.WriteLine( "" + row.Index );
}
}
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