Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics
Private Sub Button85_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button85.Click
Dim cell As UltraGridCell = Me.UltraGrid1.Rows(0).Cells(0)
' IsActiveCell and Activated properties off the UltraGridCell test if the cell is the same
' as the UltraGrid.ActiveCell property. So all three of following should give the same
' result.
Debug.WriteLine("Before:")
Debug.WriteLine("cell.IsActiveCell = " & cell.IsActiveCell)
Debug.WriteLine("cell.Activated = " & cell.Activated)
Debug.WriteLine("cell == UltraGrid.ActiveCell = " & (cell Is Me.ultraGrid1.ActiveCell))
' Toggle the activation.
cell.Activated = Not cell.Activated
Debug.WriteLine("After:")
Debug.WriteLine("cell.IsActiveCell = " & cell.IsActiveCell)
Debug.WriteLine("cell.Activated = " & cell.Activated)
Debug.WriteLine("cell == UltraGrid.ActiveCell = " & (cell Is Me.ultraGrid1.ActiveCell))
End Sub