title: Show values of a DataTable
body: <p>I have a <code>DataTable</code> being created:</p>
  
  <pre><code>DataTable datatable = new DataTable();
  </code></pre>
  
  <p>After populating the <code>DataTable</code> with some data, I'm trying to show its data in a <code>DataGrid</code>:</p>
  
  <pre><code>dataGrid1.DataContext = datatable.DefaultView;
  </code></pre>
  
  <p>My <code>DataGrid</code> has this configuration: </p>
  
  <pre><code>&lt;DataGrid AutoGenerateColumns="False" Height="124" HorizontalAlignment="Left"
            Margin="41,92,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="335" 
            DataContext="{Binding}" ColumnHeaderHeight="20" RowHeight="20" /&gt;
  </code></pre>
  
  <p>Although my <code>DataTable</code> has the expected data in it, the <code>DataGrid</code> is empty. </p>
  
  <p>I'm sure there's something wrong with my code, but I can't find what. How can I correctly show data in the <code>DataGrid</code> using data from a <code>DataTable</code> in WPF?</p>