How can I export a GridView.DataSource to a datatable or dataset? July 22, 2023 by Tarik Assuming your DataSource is of type DataTable, you can just do this: myGridView.DataSource as DataTable