Search code examples
vb.netgridviewdetailsview

Gridview doesn't update insert/update commands


I have a gridview that is set to a sql datasource, it is generating the columns automatically. If I add a column to the table it is referencing, it will draw that column and display it, but it does not update the insert/update commands to include the new column. Is there any way have it rebuild those commands automatically?


Solution

  • You will have to update the insert/update commands to specify the parameters, the only reason I can think that your gridview is showing the column after you have added it to the table is because your select command is doing a select * from [table]