MarkItZero
Freshman
Hello again,
I am attempting to populate a listbox from an array I have created (thanks to the help of the good people on this board). I now wish to use this array to fill in the values of a listbox.
Here is what I have so far...
LookUpItem is a class which accepts two Items (ID,Text)
I thought the code to populate the list box would be something like...
Of course the above code is totally wrong, but thats along the lines of what I was thinking.
Any Suggestions?
Thanks!
I am attempting to populate a listbox from an array I have created (thanks to the help of the good people on this board). I now wish to use this array to fill in the values of a listbox.
Here is what I have so far...
Code:
'Declare Array and Datarow
Dim ArryEquipment As ArrayList = New ArrayList()
Dim RowEquip As DataRow
'Fill Array
For Each RowEquip In DsEquipment1.Tables("EstEquip").Rows
If RowEquip("HeaderID") = HeaderID Then
ArryEquipment.Add(New LookupItem(RowEquip("EstEquipID"), RowEquip("EquipCode").ToString()))
End If
lstEquipment.Items.Add(ArryEquipment)
Next
'Insert Fill ListBox Code
LookUpItem is a class which accepts two Items (ID,Text)
I thought the code to populate the list box would be something like...
Code:
Dim i as integer
For i=0 To RowEquip.Count -1
lstbox.Items.Add(ArryEquipment)
Next
Of course the above code is totally wrong, but thats along the lines of what I was thinking.
Any Suggestions?
Thanks!