I have created a dataset in a project in visual studio that points to a table in my database
and then bound a datagridview control to it.
Now I open the database and add another column to the table in the database.
Then i open the dataset and update it’s configuration to include the change.
Then i want to update the datagridview, but I can’t add the new column.
I can right click on the tableadapter in the form where the datagridview is and get the correct table data up.
It does not matter if I delete the tableadapter and the bindingsource and dataset instance from the form, and then try and rebind it, the datagridview still won’t let me add the new column.
Does anyone have an idea what is happening?
I’ve tried this with several projects, both VS2008 and 2010 beta, not with other languages than C# tho.
The only solution so far seems to be to make a whole different dataset, but there has to be a better way.
Thanks in advance
Under the folder in
“C:\Users\YOURUSERNAME\AppData\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies”
visual studio has a load of compiled things it uses for quick reference. These are named after some hashing scheme so we can’t tell which one is the compiled settings for our botched table scheme.
1. We start by closing Visual Studio (I just did it to be on the safe side)
2. Delete all the folders in the ProjectAssemblies folder.
3. Open up Visual Studio again
4. Rebuild solution
5. And NOW we get the correct values when we add columns to our datagridview.
WHEW! 😀