title: How to Bind a List<object> to DataGrid using MVVM at Runtime
body: <p>All, I have an View model that is bound to a <code>DataGrid</code> using MVVM. </p>
  
  <pre><code>&lt;DataGrid ItemsSource="{Binding Path=Resources}"&gt;...&lt;/DataGrid&gt;
  </code></pre>
  
  <p>Where </p>
  
  <pre><code>public ObservableCollection&lt;ResourceViewModel&gt; Resources { get; private set; }
  </code></pre>
  
  <p>in the <code>ResourceViewModel</code> class I have the following properties</p>
  
  <pre><code>public string ResourceName
  {
      get { return this.resource.ResourceName; }
      set { 
          ...
      }
  }
  
  public ObservableCollection&lt;string&gt; ResourceStringList
  {
      get { return this.resource.ResourceStringList; }
      set {
          ...
      }
  }
  </code></pre>
  
  <p>All properties are displayed in the <code>DataGrid</code> but the <code>ResourceStringList</code> colletion is being displayed as '(Collection)'.</p>
  
  <p>How can I get the <code>DataGrid</code> to display each of the strings contained in the <code>ResourceStringList</code> in its own column?</p>
  
  <p>Thanks very much for your time.</p>
  
  <hr>
  
  <p><em>Edit. I have implemented the suggestion by @Marc below. I now have the following screenshot to illustrate what I now require:</em></p>
  
  <p><img src="https://i.stack.imgur.com/WwwuR.png" alt="ResourceStudio"></p>
  
  <p><em>The blank column before my resources column index 3 (zero indexed) is not required, <strong>how do I remove this column?</strong>.</em> </p>
  
  <p><em>I would also like to know <strong>how to add column names to my resource columns?</strong> Perhaps I can just add a <code>Binding</code> to <code>Header</code> property of the <code>SeedColumn</code>.</em></p>
  
  <p>Again thanks for your time.</p>