title: WPF How to Set selecteditem of bound combobox in a listview with different itemsource
body: <p>Hi I have a ComboBox on a ListView item, the ComboBox uses one ObservableCollection and the ListView uses another. How can I set the selecteditem of the ComboBox to the value of a column in the listview item?</p>
  
  <p>The ListView uses a GridView defined as follows:</p>
  
  <pre><code>        &lt;GridView x:Key="manage_calls_gridView"&gt;
          &lt;GridViewColumn Header="Name" DisplayMemberBinding="{Binding MCName}" /&gt;
          &lt;GridViewColumn Header="Allocated To" DisplayMemberBinding="{Binding MCPostCode}" /&gt;
          &lt;GridViewColumn Header="Post Code" Width="180" CellTemplate="{StaticResource manage_calls_pcode}" /&gt;
      &lt;/GridView&gt;
  </code></pre>
  
  <p>With the ComboBox defined in a DataTemplate as follows:</p>
  
  <pre><code>        &lt;DataTemplate x:Key="manage_calls_pcode"&gt;
          &lt;ComboBox Width="180" DropDownClosed="mc_pcode_DropDownClosed" DataContext="{Binding DataContext,RelativeSource={RelativeSource AncestorType={x:Type ListView}}}" 
                    ItemsSource="{Binding Path=LookUpCollection_6}" 
                    DisplayMemberPath="Desc"
                    /&gt;
      &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>This is the class the ComboBox uses for its ObservableCollection (LookUpCollection_6)</p>
  
  <pre><code>        public class LookUp
      {
          public string Id { get; set; }
          public string Desc { get; set; }
      }
  </code></pre>
  
  <p>This is the class the ListView, containing the ComboBox, uses for its ObservableCollection (SalesAgentList)</p>
  
  <pre><code>        public class SalesAgentRec
      {
          public string MCName { get; set; }
          public string MCPostCode { get; set; }
          public string MCSource { get; set; }
          public string MCUid { get; set; }
          public string MCRecs { get; set; }
      }
  </code></pre>
  
  <p>I need to set the selected item/value of the ComboBox to the value of MCPostCode.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Steve.</p>