Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics
Private Sub Button86_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button86.Click
' Get the 6th (visible indexes start at 0 as well) visible row.
Dim row1 As UltraGridRow = Me.UltraGrid1.Rows.GetRowAtVisibleIndex(5)
' Highlight the row with Red for easy identification in the UltraGrid.
row1.Appearance.BackColor = Color.Red
' This should write out 5 as the visible index.
Debug.WriteLine("Row 1 VisibleIndex = " & row1.VisibleIndex)
' Using GetRowAtVisibleIndexOffset method, get the 2nd row after row1.
Dim row2 As UltraGridRow = Me.UltraGrid1.Rows.GetRowAtVisibleIndexOffset(row1, 2)
' Highlight the row with Green for easy identification in the UltraGrid.
row2.Appearance.BackColor = Color.Green
' This should write out 7 as the visible index.
Debug.WriteLine("Row 2 VisibleIndex = " & row2.VisibleIndex)
End Sub