绑定到列表的ComboBox的MemberValue是什么 ?

问题描述 投票:2回答:1

绑定到ValueMamberComboBoxList<string>是什么?

我正在使用Windows窗体和.NET Framework 4。

  cmbForms.DataSource = Forms;
  cmbForms.ValueMember="System.String";
  if (!string.IsNullOrWhiteSpace(PhotoDescription.Details.Form))
  {
      cmbForms.SelectedValue = PhotoDescription.Details.Form;
  }

Forms在哪里:

 public List<string> Forms { get; set; }
c# list winforms data-binding combobox
1个回答
5
投票
来自MSDN
© www.soinside.com 2019 - 2024. All rights reserved.