Groups | Blog | Home
all groups > dotnet ado.net > may 2007 >

dotnet ado.net : vb.net take array data and put in combobox


lopez510
5/5/2007 3:15:04 AM
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
Flomo Togba Kwele
5/6/2007 1:36:46 PM
Can you please post the definition of Race01?
--


Cor Ligthert [MVP]
5/7/2007 12:00:00 AM
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

"lopez510" <u33940@uwe> schreef in bericht news:71b3dc732d964@uwe...
[quoted text, click to view]

AddThis Social Bookmark Button