title: DataGrid: Help accessing a control defined in a CellEditingTemplate
body: <p>I am using the WPF DataGrid with a DataGridTemplateColumn.  The DataGridTemplateColumn.CellEditingTemplate contains a ComboBox with IsEditable set to 'true'.  In my RowEditEnding event handler, I'd like to read the Text property of that ComboBox - the only problem is that I don't know how to retrieve the ComboBox instance within the event handler in order to get to the Text property.</p>
  
  <p>For reference, here's my DataTemplate:</p>
  
  <pre><code>  &lt;!-- ... --&gt;
    &lt;my:DataGridTemplateColumn.CellEditingTemplate&gt;
        &lt;DataTemplate&gt;
            &lt;ComboBox IsEditable="True" ItemsSource="{Binding Source={StaticResource ProductCategories}}" SelectedItem="{Binding Path=Name}" DisplayMemberPath="Name" /&gt;
        &lt;/DataTemplate&gt;
    &lt;/my:DataGridTemplateColumn.CellEditingTemplate&gt;
    &lt;!-- ... --&gt;
  </code></pre>
  
  <p>And my code:</p>
  
  <pre><code>    private void productsDataGrid_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e)
      {
          // UH-OH! Where do I find the ComboBox instance?
      }
  </code></pre>
  
  <p>I know that I can get to the current affected row using e.Row... Maybe the solution involves something using e.Row?
  I've tried walking the visual tree recursively from e.Row down looking for an instance of ComboBox, but no dice.  I'm almost positive that the solution is simple, however, I'm relativley new to WPF in general.
  Any suggestions would be much appreciated.</p>
  
  <p>Thanks!</p>