Hi all,

I am currently having a problem getting my datagridview to update after I have edited a record.

First off, I edit the record on a seperate form. I then pass those values (id and nbr) back to a function on the main form, and that function in turn calls an SQL query to get the updated record.

Code:
Public Function RefreshTable(ByRef id As String, ByRef nbr As String) As Boolean
        Dim coll As New User
        Dim i As Integer

        Try
'get the most recent record(s)
            DataMgr.GetRec(necessary parameters here)
        Catch ex As Exception
            If MessageBox.Show("No records found for the id/nbr combination entered", "Application Error", MessageBoxButtons.OK) _
            = Windows.Forms.DialogResult.OK Then
                Me.Focus()
            End If
        End Try

        'clear the datagrid
        DataGridView1.Rows.Clear()
        'set the size of the grid
        DataGridView1.Width = 643
        DataGridView1.Height = 160

        'fill the datagrid with the collection data
        For i = 0 To coll.Count - 1
            DataGridView1.Rows.Add(coll(i).id, coll(i).nbr).ToString()
        Next
    End Function
The issue is that the datagridview does not change. It displays the same record(s) and does not show me the updated version of the record I just changed.

I'm scratching my head because the collection, at this point, contains the most updated record from the database, but I simply cannot get the record to display on the grid. I'm sure it's something easy that I'm missing (as usual), but I have no idea what it is.