title: How to store a hidden value in a WPF combo box for use in SelectionChanged method
body: <p>I have a ComboBox:</p>
  
  <pre><code>&lt;ComboBox Name="Gen2Fis" ItemsSource="{Binding Path=Table}"   SelectionChanged="Gen2Fis_SelectionChanged"  DisplayMemberPath="LongName"&gt;
  </code></pre>
  
  <p>The query used to fill this combobox is:</p>
  
  <pre><code>Select ShortName, LongName from Table;
  </code></pre>
  
  <p>Based on the item selected from this list I want call another method with the selected item, but I need to use the ShortName (that isn't displayed) instead of the LongName (which is).</p>
  
  <p>How would I go about doing this?  Can I somehow hide the shortname in the list?</p>
  
  <p>My method for loading the combo box:</p>
  
  <pre><code>public void LoadFINamesIntoList(string mainDB)
      {
          XiphosStr.ConnectString = mainDB;
          dbConnection = new MyDatabaseConnection(XiphosStr.ConnectString);
          DataSet ds = dbConnection.ExecuteQuery(Queries.getFIs);
  
          Gen2Fis.DataContext = ds.Tables[0].DefaultView;   
      }
  </code></pre>
  
  <p>My method for the selection change:</p>
  
  <pre><code>private void Gen2Fis_SelectionChanged(object sender, SelectionChangedEventArgs e)
      {
          string gen2fi = (XiphosDB2.SelectedItem as ComboBoxItem).Content.ToString();
          Gen2Str.ConnectString = gen2fi;
          DisplayGen2Users();
      }
  </code></pre>
  
  <p>gen2fi will equal the long name, but I need the short name.</p>
  
  <p>Thanks for any help.</p>
  
  <p>Jason</p>