I use a method that returns either a dataset or a collection depending
on the method called. Since no database is involved at the layer I'm
working, I can't use a data adapter's fill method to fill these results
into my local dataset. How can I get these results into the local
dataset?
I need the results place into a dataset to allow working with
DataGridTableStyle for grid formatting.
Thanks,
Brett
tdavisjr - 12 Dec 2005 21:47 GMT
Loop through the collection and dynamically create a DataTable in
memory, then you can stick that DataTable in you dataset if you need it
in there.
Nicholas Paldino [.NET/C# MVP] - 12 Dec 2005 21:50 GMT
Brett,
You shouldn't have to get the results into a dataset to allow wirking
with the DataGridTableStyle... It should be able to work with whatever
BindingManager is being used to get the data from.
If you want to populate a data set, then it is easy, all you have to do
is get the appropriate table, and call the Add method on the
DataRowCollection returned to you from the Rows property.
Hope this helps.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>I use a method that returns either a dataset or a collection depending
> on the method called. Since no database is involved at the layer I'm
[quoted text clipped - 7 lines]
> Thanks,
> Brett