Populate a combobox with collection
- by user228777
I am trying to bound combobox to a collection. Collection is returning 3 cols. How do I a specify DatavalueField and Datatextfield to 2 of the columns returned in my collection?
When I write following code Combox is populated with text showing MfnBusinessData.Item for each item.
Thanks
Dim ItemCollection As Collection(Of MfnBusinessData.Item)
Dim oms = New MfnDataAccess.LookupDal
ItemCollection = oms.GetLookupItems("OFXQuestionText", "FULL", "ALPHA", "en")
RadComboBox1.DataSource = ItemCollection
RadComboBox1.DataBind()
'RadComboBox1.DataValueField = ItemCollection.Id
'RadComboBox1.DataTextField = "Text"