title: Convert BindingSource to Datatable or Dataset
body: <p>I am using data binding source which datasource bind with list. Now I converting this datasource to dataset but it throw up the exception like:</p>
  
  <blockquote>
    <p>Unable to cast object of type 'System.Windows.Forms.BindingSource' to type 'System.Data.DataSet'</p>
  </blockquote>
  
  <p>I am writing this code to convert datasource to dataset.</p>
  
  <pre><code> if (childCtrl is DataGridView)
                      {
                          DataSet ds = new DataSet();
                          ds = (DataSet)(((DataGridView)childCtrl).DataSource);
                          ds.WriteXml(@"D:\AverageReporting.xml");
                      }
  </code></pre>
  
  <p>So there is any possible way to converting binding source data to dataset?</p>