Android Question Move to a Row in ListView

GeoffT660

Active Member
Licensed User
Longtime User
I'm trying to read a value and find that value in a ListView and move to that row in the list view. I can see the JumpToRow function but what is the best way to search a value in a column and return the row number to Jump to.
 
Create a list, too:

Code: Copy
Dim MyList as list

When you add a line to the listview, add it to the list, too.

Later you can search in it with

Code: Copy
i=MyList.IndexOf("SomeText")

and get the index ("line") of the found text which is equal to the listview's row index.

If not found you'll get a -1

With it you can use that code snippet to scroll to the wanted position (like x'th row * row height)
 
Upvote 0
Thanks for your help. I was able to create a list by looping through the SQLLite Table with the same SQL Select statement as in the LoadSqlLiteDB Call and it worked as your suggested. What if I'm using LoadSqlLiteDB to fill the table and there could be searching on different fields (columns) but only one field at a time. Are there any other methods to accomplish the same thing?
 
Upvote 0
What if I'm using LoadSqlLiteDB to fill the table and there could be searching on different fields (columns) but only one field at a time. Are there any other methods to accomplish the same thing?
start a new thread for this question describing what you want to archieve and whatcode you are using. Without seeing what you have done and how it is hard to give advices. But this question is more related to sqlite than the topic here (therefore new thread)
 
Upvote 0
Back
Top