Ajay Gautam

Ajay Gautam

  • NA
  • 204
  • 0

Convert a GridView.DataSource to DataTable or Dataview

Jul 25 2010 12:39 AM
Hi All,
I have one gridview and i want to take all the values in a datatable or dataview.

I tried like this
DataTable gridTable = (DataTable) dataGrid1.DataSource;

but gridTable is showing null, it should not show null because gridview has lot of records with 3 columns

Is there any way i can convert/store a gridview.Datasource records in a datatable or dataview?


Answers (3)