what is the best way to implment row filter for tableview ?

Hi experts,

What is the best way to implement filter of items in Tableview. For example if the TableView contains items about locations. I want the user to be able to filter based on the selected locations.

Thanks

Abdul

Any advice :slight_smile:

:slight_smile: please share your experince

Hi Abdul,

I think for this, you should try to loop through all rows, detect if they are “valid” or not (should be shown), and if not, delete them.

Brent

Assuming the data is coming from a SQLite db, I would typically update my SQL select statement to incorporate the search criteria, rerun the SQL select, drop all rows in tableView and reload.

Thx Brent and ksan,

My data is coming from server as json. Thats was it is dff to do id via select . Otherwise it is gopd idea.

Also my filter is having more that one item such as regions and types … both items are basically columns in that row.

Also I want to save the filter when user open the app it should recall what was filtered .

What are your ideaa in this case ??

Any advice :slight_smile:

:slight_smile: please share your experince

Hi Abdul,

I think for this, you should try to loop through all rows, detect if they are “valid” or not (should be shown), and if not, delete them.

Brent

Assuming the data is coming from a SQLite db, I would typically update my SQL select statement to incorporate the search criteria, rerun the SQL select, drop all rows in tableView and reload.

Thx Brent and ksan,

My data is coming from server as json. Thats was it is dff to do id via select . Otherwise it is gopd idea.

Also my filter is having more that one item such as regions and types … both items are basically columns in that row.

Also I want to save the filter when user open the app it should recall what was filtered .

What are your ideaa in this case ??