When adding a larger column to the database table, how do you get the datagridview view to show the change?

I created a dataset in a project in visual studio that points to a table in my database and then linked 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 its configuration to enable the change.

Then I want to update the datagridview, but I cannot add a new column. I can right-click on the tableadapter in the form where the datagridview is located and get the correct table data.

It doesn't matter if I remove the tableadapter table and the bindingsource and dataset instance from the form, and then try to re-validate it, the datagridview will still not allow me to add a new column.

Does anyone have an idea what is going on?
I tried this with several projects, both VS2008 and 2010 beta, and not with languages ​​other than C # tho.
The only solution seems to be to create a completely different dataset, but there should be a better way.

Thank you in advance

+5
source share
3 answers

​​ "C:\Users\YOURUSERNAME\AppData\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies"
, . , , .
1. Visual Studio ( , )
2. ProjectAssemblies.
3. Visual Studio
4.
5. , datagridview.

!: D

0

: 1. 2. . 3. datagridview

, , .

+1

GridView AutoGeneratedColumn true, , fasle, aspx, , <Columns>

<asp:BoundField DataField="ColumnName" HeaderText="Header Text which you want to for table th " />

, .

0

All Articles