VB.net datagrid load

jhumphreys

New member
Joined
Aug 30, 2005
Messages
1
Programming Experience
10+
I would like some help in solving the problem listed below:

I have a datagrid which is loaded by a stored procedure.

There are times when I need to load the datagrid with a different stored procedure.

I am using the data adapter and data set to load the data grid.

Is there a way to change which data adapter / data set loads in data grid?

Any help would be greatly appreciated. Thanks.
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,454
Location
Sydney, Australia
Programming Experience
10+
The DataGrid is bound to whichever DataTable or DataSet you assign to its DataSource property. You can Fill any DataTable or DataSet using whatever DataAdapter you want and then bind that to the grid. You just need to include the decision logic in your application to determine which objects to use, as you always do whatever you are trying to achieve.
 
Top Bottom