|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Selected Row ListViewI have gotten my ListView populated, almost broke my arm patting myself
on the back. Now I am not able to find out how to return information from a row that has been selected. I have searched and searched, this link seems to have somethings that should help me: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21891615.html But when I try using ListView1.SelectedItems(0).Item(0).Text, I get an error of Specified argument was out of the range of valid values. I have the properties of the ListView set: lsvTest.CheckBoxes = True lsvTest.FullRowSelect = True lsvTest.GridLines = True Any help would be appreciated, thankfully I am already bald so that I am not pulling my hair out over this. Scott Moore
Show quote
Hide quote
On 8 Sep 2006 09:34:45 -0700, "samoore33" <samoor***@gmail.com> wrote: A populated ListView Row consists of n number of Item.SubItems:>I have gotten my ListView populated, almost broke my arm patting myself >on the back. Now I am not able to find out how to return information >from a row that has been selected. I have searched and searched, this >link seems to have somethings that should help me: >http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21891615.html >But when I try using ListView1.SelectedItems(0).Item(0).Text, I get an >error of Specified argument was out of the range of valid values. > >I have the properties of the ListView set: >lsvTest.CheckBoxes = True >lsvTest.FullRowSelect = True >lsvTest.GridLines = True > >Any help would be appreciated, thankfully I am already bald so that I >am not pulling my hair out over this. > >Scott Moore Private Sub Listview1_ItemSelectionChanged(ByVal sender As Object, ByVal e As _ System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles Listview1.ItemSelectionChanged Dim MyFirstItem As String = e.Item.SubItems(0).Text Dim MyNextItem As String = e.Item.SubItems(1).Text End Sub Gene
Hiding a Property
LAN IP Visual Basic beginner question self-extracting files in .net Writing a brute force program using SendKeys.Send AxSHDocVw.AxWebBrowser events String quickie: Remove trailing space from each RichTextBox line? File Not Accessed Restricting the resizing of forms Adding row to data table in .net 2.0 |
|||||||||||||||||||||||