Version

Index Property (UltraDataBand)

Retruns the index of the band in the parent collection. If this is the root band, returns -1 since the root band doesn't have a parent collection.
Syntax
'Declaration
 
Public ReadOnly Property Index As Integer
public int Index {get;}
Example
Following code demonstrates what Index property off UltraDataBand does.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDataSource


    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim childBand As UltraDataBand = Me.UltraDataSource1.Band.ChildBands(0)

        Dim index1 As Integer = Me.UltraDataSource1.Band.ChildBands.IndexOf(childBand)
        Dim index2 As Integer = childBand.Index

        ' Following two lines should print out the same index.
        Debug.WriteLine("Index1 = " & index1)
        Debug.WriteLine("Index2 = " & index2)
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDataSource;
using System.Diagnostics;


		private void button1_Click(object sender, System.EventArgs e)
		{
			UltraDataBand childBand = this.ultraDataSource1.Band.ChildBands[0];

			int index1 = this.ultraDataSource1.Band.ChildBands.IndexOf( childBand );
			int index2 = childBand.Index;

			// Following two lines should print out the same index.
			Debug.WriteLine( "Index1 = " + index1 );
			Debug.WriteLine( "Index2 = " + index2 );
		}
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