January 28th, 2010, 12:20 PM
Dynamic DB Connect in Gridview Drop-down
I have a VB .NET web page containing one gridview bound to a datasource. When you do edit mode on on the gridview, there are several drop-down lists bound to other datasources. In our environment we have separate servers for Test and Production so I have 2 connect strings in the Web.Config.
When I check the environment, I change the datasource on the gridview by doing the following: IndustryDataSource.ConnectionString = GetConnectionString(CurrentEnv)
This works just great for the gridview. However, the drop-downs in the edit-mode always point to the default connection. Can anyone tell me how to change the datasource dynamically in the drop-downs in the grid. Thanks a bunch!
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.