943,689 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 5436
  • VB.NET RSS
Jun 9th, 2005
0

loading a combobox with Listarray

Expand Post »
when running program I can see all 9 items of data are loaded into myComboBox, but when it displays on the screen all I get is 9 instances of "Test1.Global+ListCodes". What do I need to use in the DisplayMember spot?
I've tried original field name of "Name1", "test.codeName"

PublicStructure ListCodes
Public codeName AsString
Public codeValue AsString
EndStructure

...
Dim myData AsNew ArrayList
Dim test As ListCodes

While myReader.Read()
test = New ListCodes
test.codeName = myReader.Item(0)
test.codeValue = myReader.Item(1)
myData.Add(test)
EndWhile

myComboBox.DataSource = myData
myComboBox.DisplayMember = ??????
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Robert Walker is offline Offline
12 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: VB INterface
Next Thread in VB.NET Forum Timeline: Problems with a launch condition in vb.net Application





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC