Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
615
How to bind an UltraComboEditor to a dynamic list?
posted

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

Parents
No Data
Reply
  • 53790
    posted

    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

Children