Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDataSource
Imports Infragistics.Win.UltraWinGrid
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
' SuspendBindingNotifications and ResumeBindingNotifications are used when
' performing a large number of updates to the data. What it does is that it
' prevents the UltraDataSource from firing ListChanged notifications on the
' IBindingList implementation so any bound controls do not process the
' individual changes. When ResumeBindingNotifications is called,
' UltraDataSource will fire ListChanged with Reset as the type specifying
' to the bound controls that they should reget the data for all rows. This
' can be more efficient than firing notifications for individual changes
' when there are lot of changes being made.
'
Try
' Suspend IBindingList ListChanged notifications.
Me.UltraDataSource1.SuspendBindingNotifications()
' Value of BindingNotificationsSuspended property should be true after
' calling SuspendBindingNotifications method.
Debug.WriteLine("Binding Notifications Suspended: " & Me.UltraDataSource1.BindingNotificationsSuspended)
Dim row As UltraDataRow
Dim column As UltraDataColumn
For Each row In Me.UltraDataSource1.Rows
For Each column In row.Band.Columns
row(column) = DBNull.Value
Next
Next
Finally
' Resume ListChanged notifications.
Me.UltraDataSource1.ResumeBindingNotifications()
End Try
End Sub