Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Use the same data source and data member to access the currency manager in the
' button's click handler below.
Me.ultraGrid1.SetDataBinding(Me.DataSet11, "Customers")
End Sub
Private Sub Button87_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button87.Click
' Get the currency manager.
Dim cm As CurrencyManager = CType(Me.BindingContext(Me.DataSet11, "Customers"), CurrencyManager)
Dim row As UltraGridRow = Me.UltraGrid1.Rows(0)
Dim listObject1 As Object = row.ListObject
Dim listObject2 As Object = cm.List(row.ListIndex)
' Write out the type names. If we are bound to a data set like in this case, these
' objects should be DataRowView objects.
Debug.WriteLine("listObject1 type = " & listObject1.GetType().Name)
Debug.WriteLine("listObject2 type = " & listObject2.GetType().Name)
' Following should write out true.
Debug.WriteLine("Are listObject1 and listObject2 the same: " & (listObject1 Is listObject2))
End Sub