Android Question SQLite & Listview, get more columns on click from DB

Ferdari

Active Member
Licensed User
Longtime User
Hello!

i have a listview populated with sqlite, if i click an item i want to show a msgbox with more info of the entry from db, but i dont know how to get the ID to do another query and get the info from other columns of the item, i know its a noob question.

Any response will be apreciated
 

mangojack

Expert
Licensed User
Longtime User
Fedari ... When you populate Your Listview use ListView.AddSingleLine2 method or AddTwoLines2. This allows you to store a return Value for ListView Click events.
this way you will always have the Record ID available to do another query. ie
B4X:
    ListView1.AddTwoLines2(recData(1) , recData(2 ), RecID)     'RecID will be the return value of any ListView click event
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…