G GeoffT660 Active Member Licensed User Longtime User Feb 5, 2015 #1 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.
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.
KMatle Expert Licensed User Longtime User Feb 5, 2015 #2 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
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)
G GeoffT660 Active Member Licensed User Longtime User Feb 6, 2015 #3 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
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?
DonManfred Expert Licensed User Longtime User Feb 6, 2015 #4 GeoffT660 said: 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? Click to expand... 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
GeoffT660 said: 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? Click to expand... 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)