Android Question xCustomListView Filter

AHilberink

Active Member
Licensed User
Longtime User
Hi,

Case:
I have a xCustomListView with a Checkbox on every row.
I have an EditText containing a text to search within/filter the view.

Currently I use to fill the CustomListView:
B4X:
    SearchString="SELECT Code FROM "&Main.DBContainers
    If(Search <> "") Then SearchString=SearchString.Trim&" WHERE Code LIKE '%" &Search& "%'"
    SearchString=SearchString.Trim&" ORDER BY Type, Code"

I need the possibility to check the Checkbox of more than one row.
For every check I need to have another search-action based on the content of the EditText.
Reload the clv by using clv.clear is no options, because of the lost of the checkboxes before.

Question:
Is it possible to Filter a xCustomListView based on the Label.text on the row?

Kind regards,
André
 

Peter Lewis

Active Member
Licensed User
Longtime User
What I did to solve this was to put the row number and textfield into a separate list and use that list to control the customlistview. On each row of the customlistview I had the row number in the Value field. A normal list was More powerful to do these type functions, i am not saying it is the correct way to do it , just my 5c worth
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
What I did to solve this was to put the row number and textfield into a separate list and use that list to control the customlistview. On each row of the customlistview I had the row number in the Value field. A normal list was More powerful to do these type functions, i am not saying it is the correct way to do it , just my 5c worth

Thanks Peter, This is very usefull. It needs more List objects, but it will solve my problem.
 
Upvote 0
Top