How can I export a GridView.DataSource to a datatable or dataset?

Penguen picture Penguen · Apr 24, 2009 · Viewed 197.1k times · Source

How can I export GridView.DataSource to datatable or dataset?

Answer

Kon picture Kon · Apr 24, 2009

Assuming your DataSource is of type DataTable, you can just do this:

myGridView.DataSource as DataTable