title: Binding List<List<String>> to DataGrid
body: <p>I am wondering how to bind a <code>List&lt;List&lt;String&gt;&gt;</code> to the columns of a DataGrid in WPF. Say I have the following code:</p>
  <pre><code>List&lt;List&lt;string&gt;&gt; ugly = new List&lt;List&lt;string&gt;&gt;();
  List&lt;string&gt; u0 = new List&lt;string&gt;{&quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;};
  List&lt;string&gt; u1 = new List&lt;string&gt; { &quot;five&quot;, &quot;six&quot;, &quot;seven&quot;, &quot;eight&quot; };
  List&lt;string&gt; u2 = new List&lt;string&gt; { &quot;nine&quot;, &quot;ten&quot;, &quot;eleven&quot;, &quot;twelve&quot; };
  ugly.Add(u0);
  ugly.Add(u1);
  ugly.Add(u2);
  </code></pre>
  <p>If I set the ItemsSource of the datagrid (called <code>dataGrid</code>) to one of the <code>List&lt;string&gt;</code>, then a column is filled with the appropriate data. For example, <code>dataGrid.ItemsSource = u0</code> results in the following:</p>
  <p><img src="https://i.stack.imgur.com/PSRe8.png" alt="enter image description here" /></p>
  <p>How do I make it so that there is a column for each <code>List&lt;String&gt;</code> in <code>ugly</code>?</p>