I'm having a very strange issue with retrieving and displaying the contents of an Access table in a DataGridView. The problem is as follows:
I'm working on an application in VS2010 that has two forms. The main form displays the second form upon a button press, and the second form contains a DataGridView that is linked to an Access table on my local PC using a BindingSource (or DataSet, or what have you). When I first set the Data Source property of my grid to the table as a new data source (meaning I add it to the project right then and there), the grid accurately reflects the current contents of my table. After that point, however, I am completely unable to change the displayed contents of the table on the grid; the contents are stuck as those rows. Even after both adding and removing rows through both the program I'm writing and through Access itself, the grid's contents never change to reflect the current data. The ghost contents also persist through program resets (closing the program and re-opening) and through reassignment of the data source.
The most progress I've made is being able to clear the grid completely using
grdTableDisplay.DataSource = Nothing
grdTableDisplay.Rows.Clear()
But on reassignment of the Data Source using
grdTableDisplay.DataSource = TableDisplayBindingSource
the ghost data returns. This leads me to believe that my binding source or data set aren't being updated at all after the initial data source setup.
I would greatly appreciate any insight into this issue that anyone can offer me; this problem is preventing me from testing my application and is probably quite simple to resolve. Thanks in advance!