Index プロパティは、この列が属している UltraDataColumnsCollection 内でのこの列の位置を返します。このプロパティは、UltraDataColumnsCollection の UltraDataColumnsCollection.IndexOf メソッドと同じ値を返します。
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 column As UltraDataColumn = Me.ultraDataSource1.Band.Columns(1) Dim index1 As Integer = Me.ultraDataSource1.Band.Columns.IndexOf(column) Dim index2 As Integer = column.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) { UltraDataColumn column = this.ultraDataSource1.Band.Columns[1]; int index1 = this.ultraDataSource1.Band.Columns.IndexOf( column ); int index2 = column.Index; // Following two lines should print out the same index. Debug.WriteLine( "Index1 = " + index1 ); Debug.WriteLine( "Index2 = " + index2 ); }