Hi all!
I am trying to bind a coded valuelist to an UltraCombo.
My code is this:
Dim cboValueListe As New Infragistics.Win.ValueList
cboValueListe.ValueListItems.Add(1, "Tab")
cboValueListe.ValueListItems.Add(1, "Header")
With locElement
.DataSource = cboValueListe
End With
End Sub
where lcoElement is the Ultracombo.
and here is the unexpected result:
any ideas?
Hi,
We've recently started using coded UI and also been unable to get the UltraComboEditor to work. In addition we're still searching how to assign an automation ID to the other controls.
Thanks.
Hello,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
Thank you for posting in our forums.
This is happening because, when an object is used for the data source the UltraCombo will use all its public properties which aren’t collections for columns and all public collection properties will be used to create new bands. This is how binding in Windows Forms generally works, you will notice the same behavior with Microsoft DataGrid for example.
If you just want to have a collection of items in your dropdown I would suggest using UltraComboEditor, which has a ValueList property to which you can add the items directly. If you want to have a dropdown with multiple columns, then use UltraCombo by either providing a DataSet/DataTable or a collection of objects that represent your data.
I have attached a sample which demonstrates both approaches.
Please let me know if you have any additional questions.