SHARE
TWEET

Can't alter DisplayMember in WinForms ComboBox

a guest Feb 26th, 2012 22 Never
  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.     }
RAW Paste Data
Top