listview - clikc on row to retyrieve value of the selected item
Posted on 2004-11-02
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.selectedIndices.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_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Dim selected_counter = rmac_listview.SelectedIndices.Count
Dim selected_record = rmac_listview.SelectedIndices(0)
Dim temp = rmac_listview.Items(selected_record).Text