DataSet w/ many tables to one Datagrid

A

arun.hallan

I have a dataset that calls a stored procedure within our system.
The stored procedure saves each table into the dataset.

I want now to display each table one after the other, all in the same
datagrid.


I've tried: this.grdResults.DataSource = results.DefaultViewManager;

But that doesnt work.



Any ideas?
 
B

Bob Barrows [MVP]

I have a dataset that calls a stored procedure within our system.
The stored procedure saves each table into the dataset.

I want now to display each table one after the other, all in the same
datagrid.


I've tried: this.grdResults.DataSource = results.DefaultViewManager;

But that doesnt work.
If all the resultsets have the same number of columns, you can use a union
query to combine them into a single resultset.

If that is not feasible, then you are going to have to create a datatable or
collection class that combines all the resultsets and bind the grid to that
datatable.

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top