vb.net take array data and put in combobox

  • Thread starter Thread starter lopez510
  • Start date Start date
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
 
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
 
Back
Top