首页 > 代码库 > 为COMBOBOX绑定固定数据源(含VALUE值)

为COMBOBOX绑定固定数据源(含VALUE值)

 

        private void frmConfirmInvoice_Load(object sender, EventArgs e)        {            ArrayList list = new ArrayList();            list.Add(new DictionaryEntry("A", "1"));            list.Add(new DictionaryEntry("B", "2"));            list.Add(new DictionaryEntry("C", "3"));            cmbClass.DataSource = list;            cmbClass.DisplayMember = "Key";            cmbClass.ValueMember = "Value";        }

 

为COMBOBOX绑定固定数据源(含VALUE值)