title: observablecollection to dataView or dataset
body: <p>I have a Datagrid formed by binding observablecollection, Now i want to provide Export to excel Functiom, So i need to Convert by datagrid to dataset or dataview. </p>
  
  <pre><code>public ObservableCollection&lt;DataSourceVM&gt; Backends { get; set; }
  private void StartExport(String filepath)
     {
         try
       {
        DataTable bs = _dataGrid.ItemsSource as DataTable;
        _dataSet = bs.DataSet as DataSet;
  
     }
     catch (Exception e1)
    {
       MessageBox.Show("error");
    }
  }
  </code></pre>
  
  <p>The ItemSource Contains a baseclass and Backend entity class </p>