title: how to bind one dimensional string array result to datagrid column header
body: <p>I have a query as follows, which returns the list of server names and component names</p>
  
  <pre><code>string match = "TEST"
  
  var headerArray = from a in this.db.Servers
                   where a.ServerID.Contains(match)
                   join b in this.db.Components
                          on a.ServerID equals b.ServerID into g
                  select new
                  {
                      a.ServerID,
                      Components = g.Select(x =&gt; x.Name), 
                  };
  
  List&lt;string&gt; result = new List&lt;string&gt;();
  
  foreach (var server in headerArray)
  {
      result.Add(server.ServerID);
  
      foreach (var componentName in server.Components)
          result.Add(componentName);
  }
  
  string[] header = result.ToArray();
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>datagrid1.ItemsSource = header.ToList();
  </code></pre>
  
  <p>header stores the list of servernames in the form of array. how to bind this result to the datagrid column ?</p>