Quantcast
Channel: Active questions tagged listview - Stack Overflow
Viewing all articles
Browse latest Browse all 622

How to search in listview

$
0
0

I am trying to create a Loop that will read through the information on my ListView through the SubItem to find the text that matches the text in my Textbox whenever I hit the search button and Focuses the listbox onto the matched text. Below is what I have but it keeps telling me that the value of string cannot be converted. I am also pretty sure that my numbers wont loop correctly but I am not really sure how to cause them to loop endlessly till end of statement.

    Dim T As String    T = Lines.Text    For r As Integer = 0 to -1        For C As Integer = 0 to -1            If List.Items(r).SubItems(C).Text = Lines.Text Then                List.FocusedItem = T            End If        Next    NextEnd Sub

Viewing all articles
Browse latest Browse all 622

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>