Create New DataTable From DataView

A

Axe

I have a DataView but now I need a DataTable to pass into several routines
I've created. Can I make a DataTable from a DataView? The DataView is now
sorted and cleaned up and I don't want to reference the original table the
DataView came from.

Axe
 
D

Daryll Shatz

You can try: dataview.table which I believe will return the table object
of the dataview

You can also create a table directly without using the dataview:

DIM datatable as new datatable("TableNameHere")
 
A

Axe

I need to re-table the view because it's been modified as a DataView. Using
the .table property only returns the original table prior to any
modifications. I learned that lesson a long time ago having spent many
fruitless hours playing with that idea.

However, I just changed all my routines to accept a DataView and either pass
in the DefaultView of the DataTables in my app or pass in the modified
(sorted/filtered, etc.) DataViews. Didn't want to do that at first, but
necessity is the mother of invention, right?

Axe
 

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

Top