0

Hello
i have created a form that has a combobox.the combobox displays the products.how can i add a selected product into a listview?????

2
Contributors
2
Replies
8
Views
6 Years
Discussion Span
Last Post by Lek Plepi
0

Let's say you have a listview named lvwStuff and it has three columns (indexed 0, 1 and 2). The following code adds one line to the listview (I have it in Details view)

Dim item As New ListViewItem
item.Text = "stuff"                 'gets added as lvwStuff.Items(0).SubItems(0)
item.SubItems.Add("stuff col 1")    'gets added as lvwStuff.Items(0).SubItems(1)
item.SubItems.Add("stuff col 2")    'gets added as lvwStuff.Items(0).SubItems(2)
lvwStuff.Items.Add(item)

Hope that helps.

Edited by Reverend Jim: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.