title: Populate a combobox in a datagrid
body: <p>I have a WPF Datagrid populated with data from one SQL table using Entity Framework, is it possible to populate a combobox in the same Datagrid using data from a different table.</p>
  
  <p>I have this code working </p>
  
  <pre><code>                &lt;DataGridTemplateColumn x:Name="reasonColumn" Header="Reason" Width="Auto"&gt;
                  &lt;DataGridTemplateColumn.CellTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;ComboBox&gt;
                              &lt;ComboBoxItem Content="Supplier Quantity"/&gt;
                              &lt;ComboBoxItem Content="Supplier Price"/&gt;
                              &lt;ComboBoxItem Content="Supplier Numbers"/&gt;
                              &lt;ComboBoxItem Content="Supplier Codes"/&gt;
                              &lt;ComboBoxItem Content="Branch Quantity"/&gt;
                              &lt;ComboBoxItem Content="Branch Numbers"/&gt;
                              &lt;ComboBoxItem Content="Branch Codes"/&gt;
                              &lt;ComboBoxItem Content="IM Numbers"/&gt;
                              &lt;ComboBoxItem Content="Pop Prices"/&gt;
                          &lt;/ComboBox&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/DataGridTemplateColumn.CellTemplate&gt;
              &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>But I would prefer it to be dynamically populated.</p>
  
  <p>Thanks.</p>