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.
joel.hahn
0
Newbie Poster
Recommended Answers
Jump to PostFor 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
Maligui
1
Application Developer
joel.hahn
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
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.