title: Linq to Xml to Datagridview
body: <p>Right, starting to go crazy here. I have the following code:</p>
  
  <pre><code>var query = (from c in db.Descendants("Customer")
                               select c.Elements());
                  dgvEditCusts.DataSource = query.ToList();
  </code></pre>
  
  <p>In this, db relates to an XDocument.Load call. How can I get the data into the DataGridView?</p>
  
  <p>Just thought I should mention: it returns a completely blank dgv.</p>
  
  <p>Not that the XML should matter too much, but here's an example:</p>
  
  <pre><code>&lt;Root&gt;
    &lt;Customer&gt;
      &lt;CustomerNumber&gt;1&lt;/CustomerNumber&gt;
      &lt;EntryDate&gt;2010-04-13T21:59:46.4642+01:00&lt;/EntryDate&gt;
      &lt;Name&gt;Customer Name&lt;/Name&gt;
      &lt;Address&gt;Address&lt;/Address&gt;
      &lt;PostCode1&gt;AB1&lt;/PostCode1&gt;
      &lt;PostCode2&gt;2XY&lt;/PostCode2&gt;
      &lt;TelephoneNumber&gt;0123456789&lt;/TelephoneNumber&gt;
      &lt;MobileNumber&gt;0123456789&lt;/MobileNumber&gt;
      &lt;AlternativeNumber&gt;&lt;/AlternativeNumber&gt;
      &lt;EmailAddress&gt;email@address.com&lt;/EmailAddress&gt;
    &lt;/Customer&gt;
  &lt;/Root&gt;
  </code></pre>