How to add an item to ComboBoxEdit?
问题 I have a small problem with ComboBoxEdit ( DevExpress.XtraEditors ). I cannot add a value or set SelectedIndex for my ComboBoxExit . ComboBoxEdit combo = new ComboBoxEdit(); ComboBoxItemCollection coll = combo.Properties.Items; coll.BeginUpdate(); try { coll.Add(new PersonInfo("Sven", "Petersen")); coll.Add(new PersonInfo("Cheryl", "Saylor")); coll.Add(new PersonInfo("Dirk", "Luchte")); } finally { coll.EndUpdate(); } combo.SelectedIndex = -1; Comboboxedit1.Properties.Items.Add(combo); It