vb.net take array data and put in combobox

L

lopez510

I am new to vb.net. I have a multidimensional array that I want to reference
and replace current data in a combobox with each line of data from the array
in the combox on an click event. I am having issues getting the data to be
displayed in the combobox.

Any help/ideas?? I can't get it to clear or add.
here is what I have, it isn't recognizing the combobox, but not sure why.

Private Sub mnuRace1_Click(ByVal sender As System.Object, ByVal e As System.
EventArgs) Handles mnuRace1.Click

Dim objhorseform As New Form1
Dim cbxHrs As New ComboBox
Dim x As Integer
Dim count As Integer
count = Race01.GetUpperBound(x)

Do While count <>0
cbxHrs.Items.Clear
cbxHrs.Items.Add(Race01(x))
objhorseform.cbxhorses.Items.Add(cbxHrs)
count -= 1
Loop
 
C

Cor Ligthert [MVP]

Lopez,

A multidimensional array is no ADONET either is a combobox.

However the combination will not work. A combobox is for a single array or
for a multicolumn datatable.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top