Hi, I have an multi-select UltraCombo on a form which is bound to a list of values. What all the guides, samples, and questions seem to omit is how to bind the control to a list of initially selected values.
I have tried both manually setting and databinding the Value property to both a List<> and array of objects (the same type of object as the data source) but neither seem to work. In fact if I step through manually setting the .Value property, the value remains an empty array.
cboControl.Value = Controller.SelectedObjects.ToArray()
Does anyone have any ideas?
From the code that you have provided, it looks like you are setting the Value of your UltraCombo to an array of the actual objects in your underlying data source. This won't do anything, as the Value is based on the ValueMember that you define for your UltraCombo. As such, I would recommend that you set the Value of your UltraCombo to a list or array of the elements that make up the values that exist on your data item with respect to the values that the ValueMember points at.
I am attaching a sample project to demonstrate the above. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.