Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDataSource
Imports Infragistics.Win.UltraWinGrid
Private Sub UltraDataSource1_RowAdding(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDataSource.RowAddingEventArgs) Handles UltraDataSource1.RowAdding
' RowAdding is fired when the user attempts to add a new row to the
' UltraDataSource through a bound control (like UltraGrid for example).
' Here you typically add a new row to the external data source if there is
' one.
Debug.WriteLine("Row is being added at " & e.Index _
& " index in the rows collection associated with band " & e.Rows.Band.Key & ".")
End Sub
Private Sub UltraDataSource1_RowAdded(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDataSource.RowAddedEventArgs) Handles UltraDataSource1.RowAdded
' Fired after RowAdding is fired.
' Row property returns the new row that was added.
Debug.WriteLine("Row was added at " & e.Row.Index & " index.")
' You can initialize the new row's values here.
Dim column As UltraDataColumn
For Each column In e.Row.Band.Columns
e.Row(column) = column.DefaultValue
Next
End Sub