title: Setting ItemsSource on a ComboBox in a DataTemplate
body: <p>My overall goal here is to have a WPF DataGrid that will show my data normally, but when edited has a ComboBox with the possible values for that specific column.</p>
  
  <p>So for example I have the following data in my DataGrid</p>
  
  <pre><code>|             Name |               Work Date | Clock In | Clock Out |    Job | Hours |
  |------------------|-------------------------|----------|-----------|--------|-------|
  | Edaurdo Gutierez |Friday February 12, 2016 |  1:06 PM |   9:00 PM | Server |  8.00 |
  |   Rubisel Lozano |Friday February 12, 2016 | 12:55 PM |   8:59 PM | Server |  8.00 |
  |       Paul Burks |Friday February 12, 2016 |  8:59 AM |   5:30 PM |   Chef |  8.50 |
  |   Roberto Agular |Friday February 12, 2016 |  8:30 AM |   4:10 PM |   Chef |  7.75 |
  </code></pre>
  
  <p>I want to be able to double click a cell and edit it's value, but the template for editing will be different with each of the columns. I'll need to do this for Work Date, Clock In, Clock Out, and Job.</p>
  
  <p>I have the Work Date column working as intended, but it's easier because it populates the DatePicker for me. For the Job column, I just end up with a blank ComboBox because I don't know how to set it's ItemsSource. Here is some of the code that makes the Work Date column function.</p>
  
  <p>XAML</p>
  
  <pre><code>&lt;UserControl.Resources&gt;
      &lt;DataTemplate x:Key="tmpDate"&gt;
          &lt;TextBlock Text="{Binding Path = Date, StringFormat = '{}{0:dddd MMMM dd, yyyy}'}"  /&gt;
      &lt;/DataTemplate&gt;
      &lt;DataTemplate x:Key="tmpDateEdit"&gt;
          &lt;DatePicker SelectedDate="{Binding Path = Date}"/&gt;
      &lt;/DataTemplate&gt;
  &lt;/UserControl.Resources&gt;
  </code></pre>
  
  <p>C#</p>
  
  <pre><code>private void gridTimeSheet_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
      {
          DataGridColumn col = e.Column;
  
          if (col.Header.ToString() == "Date")
          {
              DataGridTemplateColumn tmpCol = new DataGridTemplateColumn();
              tmpCol.CellTemplate = (DataTemplate)FindResource("tmpDate");
              tmpCol.CellEditingTemplate = (DataTemplate)FindResource("tmpDateEdit");
              tmpCol.Header = "Date";
              e.Column = tmpCol;
          }
       }
  </code></pre>
  
  <p>So my question is how can I make the Job column work in a similar way, so that when I double click to edit the cell, a ComboBox of possible values for Jobs appears? The way I want to populate this ComboBox would be through a DataTable created from a SQL query.</p>
  
  <p>I'm open to any suggestions. Perhaps the DataTemplate isn't my best option for doing these columns. Any guidance is appreciated.</p>
  
  <p>Thanks!</p>