title: Bind DataGrid to DataTable haveing columns of type Custom Objects
body: <p>I have DataTable and I am trying to bind DataGrid with DataTable. But my columns are not of simple type, they are of custom Objects.</p>
  
  <pre><code>public class Node
      {
          public string Name { get; set; }
          public int Id { get; set; }
  
          public Node(string name, int id)
          {
              Name = name;
              Id = id;
          }
      }
  
  public class NodeBool
      {
          public bool Name { get; set; }
          public int Id { get; set; }
  
          public Node(bool name, int id)
          {
              Name = name;
              Id = id;
          }
      }
  
  
       &lt;DataGrid Name="data1" AutoGenerateColumns="True" ItemsSource="{Binding MyDataTable}" /&gt;
  </code></pre>
  
  <p>The columns are not known before execution. They are known at runtime based on a list, ad list is used to add columns in the datatable</p>
  
  <p>When I bind it to datagrid, For each row under column full class name is displayed. I want to bind it to class property and depending on the property checkbox (bool) or textbox (string) should be displayed.</p>
  
  <p>I am following MVVM model.</p>