BindingNavigator
-
Greetings All: The issue is that when I execute the Fill method during a button's onClick event, it works fine. But when the Fill method is executed when a boolean propery is updated, the code executes but never populates the binding navigator. Here's the code snippets in question: Here's what works:
Private Sub FillToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FillToolStripButton.Click Try Me.SpEDMS_EnumNIOSHByStudyTableAdapter.Fill(Me.Dataset_frmPerson_NIOSH.spEDMS_EnumNIOSHByStudy, New System.Nullable(Of Integer)(CType(glStudyId, Integer))) Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try End Sub
Here's the same code in the 'propery set' that executes but the navigator never shows any dataPrivate _QueryNIOSH As Boolean Public Property QueryNIOSH() As Boolean Get Return _QueryNIOSH End Get Set(ByVal value As Boolean) _QueryNIOSH = value If value Then Try Me.SpEDMS_EnumNIOSHByStudyTableAdapter.Fill(Me.Dataset_frmPerson_NIOSH.spEDMS_EnumNIOSHByStudy, New System.Nullable(Of Integer)(CType(glStudyId, Integer))) Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try End If End Set End Property
Why does it work in one part of the form but not another? Any ideas?