title: Convert and use DataTable in WPF DataGrid?
body: <p>In normal WinForm application you can do that:</p>
  
  <pre><code>DataTable dataTable = new DataTable();
  dataTable = dataGridRecords.DataSource;
  </code></pre>
  
  <p>but how to do that with the WPF datagrid?</p>
  
  <pre><code>dataTable = dataGridRecords.ItemsSource;
  </code></pre>
  
  <p>won't work either.</p>