What I'm attempting to do is take data from my generic list (Which has 3 columns DescL, PriceL, BarcodeL) and disseminate the data like so...
A Description into label1
A Price to label2
the barcode to variable
I'm currently using a for each loop to get the data out of the list and into its correct controls. See Below...
Dim i As Integer = 0 For Each list In lists barcode = lists.Item(i).barcodeL barcode_Lbl_Desc1.Content = lists.Item(i).descL barcodes_Lbl_Price1.Content = (lists.Item(i).priceL.ToString("C2")) i = i + 1 Next
But as you can probably see from this there is no way to increment the control names with a variable in a for each loop to make it move to the next numbered labels in the sequence. I'm toying with the idea of making a user control almost like a listbox that would create a new smaller user controls inside it that has the labels and control in the right position for each item in the list. Although I have no idea how I would build such a control.
My question is what have other people done in this situation.
Thanks