title: Can a data grid in another open form be refreshed by calling a sub routine?
body: <p>Can a data grid in another open form be refreshed by calling a sub routine?</p>
  
  <p>This app has a form with 2 data grids. When the user double click on one of the grids another form is opened that shows data details. After the user changes the details the user clicks a save button.</p>
  
  <p>We have placed this code in the Closing event of the the details form.</p>
  
  <pre><code>Private Sub FormParents_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
  
      FormParentsAndStudents.RefreshDataGrids()
  End Sub
  </code></pre>
  
  <p>The code does execute because we placed a msgbox in there to test it.</p>
  
  <p>Here is the code we are trying to use to refresh the data grids. It's in the form with the 2 data grids:</p>
  
  <pre><code>Public Sub RefreshDataGrids()
  
      Me.ParentsTableAdapter.Fill(Me.DataSetParentsStudents.Parents)
      Me.StudentsTableAdapter.Fill(Me.DataSetParentsStudents.Students)
      LightGridParents.Refresh()
      LightGridStudents.Refresh()
  End Sub
  </code></pre>
  
  <p>Can you tell us what additional coding is needed to refresh this data or if we are using the incorrect place to call this code from within the details form?</p>