How to do something like this with an UltraComboEditor? listBox is a System.Windows.Forms.Listbox
List<dynamic> dynList = new List<dynamic>() { new {Id = 1, Name = "Elevator" }, new {Id = 2, Name = "Stairs" }};listBox.DataSource = dynList; listBox.DisplayMember = "Name";listBox.ValueMember = "Id";
If listBox is an UltraComboEditor an exception is trown:
System.NotSupportedException was unhandled by user code HResult=-2146233067 Message=The ValueList associated with the control does not support DataBinding. Source=Infragistics4.Win.UltraWinEditors.v12.2
Hello Henry,
I made small sample for you. Could you please take a look at the attached sample for more details and let me know if you have any questions.
Regards
This is the sample
It works perfectly. Thank you so much for your support. I just added this to have access to the Value property (ultraComboEditor1.Value):
ultraComboEditor1.DisplayMember = "Description"; ultraComboEditor1.ValueMember = "Item";
Thanks for your feedback. If you have any questions, please do not hesitate to write us