I have beeb unable to figure out how to get data from a list view. It needs to be a multislect, and I need to get the data from a specific column. my listview consists of a 3 column with data populated from a database. I am after the data in the 3rd column. I can get it to work with a single select, but not multiselect. Any help would be appreciated.
Jump to Post
For multiselected items. You use:
Dim selectedItems = MyListView.SelectedItems ' iterated through the selected items For Each item As ListViewItem In selectedItems ' get data from the third column Dim MyData = item.SubItems(2).Text Next
Column 1: ListViewItem
Column 2: ListViewItem.SubItems(0)
Column 3: ListViewItem.SubItems(1)
All 4 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.