title: Can columns in WPF datagrid hold different types of data
body: <p>I'm trying to display different rows in a datagrid with different cellcontent sometimes.  </p>
  
  <p>I have different classes for the different rows, for example</p>
  
  <p>Class 1:</p>
  
  <p>Name - Description - Checkbox</p>
  
  <p>Class 2:</p>
  
  <p>Name - Description - Textbox(user input at runtime) - Checkbox</p>
  
  <p>Class 3</p>
  
  <p>Name - Textbox(user input at runtime)</p>
  
  <p>The classes are related by inheritance so I can use them within the same observablecollection.</p>
  
  <p>I want to display these in a datagrid based on which class I chose to add, for example:</p>
  
  <pre><code>ObservableCollection&lt;Rowitem&gt; rowitems = new ObservableCollection&lt;Rowitem&gt;();
  
  rowitems.Add(new Class1("Tom", "Nice", false));
  
  rowitems.Add(new Class2("John", "Strange", Empty textbox , true));
  
  rowitems.Add(new Class3("Roger", Empty Textbox));
  </code></pre>
  
  <p>.. meaning I would like the datagrid to display an empty textbox in the third column on the second row where there is a checkbox in the first row and nothing in the third row. Is this possible?</p>