Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

assign group to listviewitem

$
0
0
hello i searched it a lot but found no help.

i have some groups in my listview. and wanna add items to listview.
they indeed add to the listview but the group is not added to the item?

this is my code
vb.net Code:
  1. Dim lwvitem As New ListViewItem
  2.             lwvitem.Text = TextBoxItem1.Text
  3.             lwvitem.SubItems.Add("offline")
  4.             lwvitem.Group = ListViewEx2.Groups(ComboBoxItem1.SelectedItem.ToString)
  5.             lwvitem.ImageKey = 1
  6.             ListViewEx2.Items.Add(lwvitem)

what am i doing wrong it seems that it does not assign the group selected in the combobox
to the item i am adding

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>