バージョン

HasPrevSibling() メソッド

行の上に兄弟行があるかどうかを示すブール式を返します。
シンタックス
'宣言
 
Public Overloads Function HasPrevSibling() As Boolean
public bool HasPrevSibling()

戻り値の型

行がその上に兄弟行を持つ場合はTrue。
解説

行の上に兄弟行があるかどうかを決定するためにこのメソッドを呼び出します。行の上に兄弟行が存在する場合、このメソッドはTrueを返します。

spanbands 引数は、他のバンドの行が兄弟と考えられるかどうかを示すために使用できます。

兄弟行への参照は、GetSibling メソッドを呼び出すことによって返すことができます。

HasChildHasNextSibling、および HasParent メソッドは、行に子行、兄弟行、および親行を持つかどうかをそれぞれ決定するために呼び出すことができます。

使用例
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 );
	}

}
参照