How do i get the SelectedItem or SelectedIndex of ListView in vb.net

前端 未结 7 1922
闹比i
闹比i 2020-12-10 13:04

As you know by question that what I want. I was using listbox. In ListBox we can get selected item by a simple line of code: listbox1.SelectedItem.

7条回答
  •  独厮守ぢ
    2020-12-10 13:55

    Here's the answer that I found for my question:

    urlList1.FocusedItem.Index
    

    And I am getting selected item value by:

    urlList1.Items(urlList1.FocusedItem.Index).SubItems(0).Text
    

提交回复
热议问题