robertjmackay
asked on
listview - clikc on row to retyrieve value of the selected item
Below is code that retrieves the text of the selected item.
When I clik on another row, it bombs with an out of bounds error. Through debug, i have learned that rmac_listview.selectedIndi ces.count = 0 after the second row is selected ... like its not recognizing the second row as being selected.
I have tried this with multi-row selection on and off and it doesn;t seem to make a difference.
What I want to do is have the user double clik on a row, pickup a few values and launch a new form, only one row
Private Sub rmac_listview_SelectedInde xChanged(B yVal sender As System.Object, ByVal e As System.EventArgs) Handles
rmac_listview.SelectedInde xChanged
Dim selected_counter = rmac_listview.SelectedIndi ces.Count
Dim selected_record = rmac_listview.SelectedIndi ces(0)
Dim temp = rmac_listview.Items(select ed_record) .Text
End Sub
When I clik on another row, it bombs with an out of bounds error. Through debug, i have learned that rmac_listview.selectedIndi
I have tried this with multi-row selection on and off and it doesn;t seem to make a difference.
What I want to do is have the user double clik on a row, pickup a few values and launch a new form, only one row
Private Sub rmac_listview_SelectedInde
rmac_listview.SelectedInde
Dim selected_counter = rmac_listview.SelectedIndi
Dim selected_record = rmac_listview.SelectedIndi
Dim temp = rmac_listview.Items(select
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.