Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Can't alter DisplayMember in WinForms ComboBox

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.58 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. private void UpdateMapRoadPointList(List<GeographicAddress> plstMapRoadPointList)
  2.     {
  3.         cboFind.DataSource = plstMapRoadPointList;
  4.         cboFind.DisplayMember = "ShortCode";
  5.         cboFind.ValueMember = "";
  6.     }
  7.        
  8. internal string ShortCode
  9.     {
  10.         get { return Distance + Carriageway; }
  11.     }
  12.        
  13. public string ShortCode
  14.     {
  15.         get { return Distance + Carriageway; }
  16.     }
  17.  
  18. private void UpdateMapRoadPointList(List<GeographicAddress> plstMapRoadPointList)
  19.     {
  20.         cboFind.DataSource = plstMapRoadPointList;
  21.         cboFind.DisplayMember = "ShortCode";
  22.     }