datatable to dataset

G

Guest

I have a dataTable being returned from my datalayet, I need to convert it to
a dataSet so I can do some data manipulation to it prior to populating my
datagrid. How can I convert the datatable to a dataset?
 
N

Norman Yuan

I do not know why you have to "convert" a datatable to dataset in order to
your data manipulating and databinding, chances are that you may not have
to.

Regardless, you cannot CONVERT DataTable to DataSet. DataSet is a container
that can contain 0 or more DataTable. If you have to place a DataTable into
a DataSet, you can

DataSet ds=new DataSet();
ds.Tables.Add(myDataTable);
 
G

Guest

Im' grouping by data in my grid, and I've tried to do that using a dataTable
and no luck. I already have a web Form that has a grid that the data is
grouped/
 
M

Marina Levit [MVP]

Well, using a dataset isn't going to help you solve your problem, even
though it is not at all clear what the problem is.

Norman explained the different between a datatable and a dataset, and the
the former is fundamentally a collection of the latter.

Maybe you should tell us what the problem is, clearly, and precisely,
providing relevant code if necessary.
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top