Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ultraGrid1.SetDataBinding(Me.DataSet11, "Customers")
' Change the value of UpdateMode from the default of OnRowChangeOrLostFocus to OnRowChange
' othewise the UltraGrid will update the row as soon as the button is clicked (since the
' UltraGrid would loose focus).
Me.ultraGrid1.UpdateMode = UpdateMode.OnRowChange
End Sub
Private Sub Button138_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button138.Click
' Get the active row.
Dim activeRow As UltraGridRow = Me.UltraGrid1.ActiveRow
' If the row has been modified, then revert back to the the original values
' since the row was last updated.
If Not activeRow Is Nothing AndAlso activeRow.DataChanged Then
activeRow.CancelUpdate()
End If
End Sub