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?????

Recommended Answers

All 2 Replies

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.

thanks a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.