Is it possible to "Hide" Listbox Rows

Is there a way to temporarily “hide” rows in a listbox without deleting/reloading them? I was hoping for something like “hide row” or “row invisible = true”.

I have a listbox that is loaded from a database and contains hundreds of rows and a smaller number of columns (the number of which can vary). After the listbox is loaded I do multiple searches on one of the columns throughout the day. Often I just scroll up and down for easy searches. But when the search is not easy I use a textfield to enter a name or portion of a name I wish to search for and the textfield.change causes the listbox to refresh and add background color to those rows that meet the search criteria. I then scroll up and down looking for the shaded rows to gather the information I need. This functions well, however the scrolling up and down is a pain.

Is it possible to “hide” the rows that don’t meet my search criteria so that the only ones that appear on the screen are the ones that meet the search criteria. After the search, I want to make all the rows visible again. I realize that I could delete the rows that don’t meet the criteria, but then I would need to reload all the info from the database after each search which seems inefficient.

I suppose I could also just have two listboxes, one with all the data which just populates the other with data that meets the criteria for the current search but that doesn’t seem like a great approach either.

Any suggestions on how to better handle this situation?

the problem is using the listbox as the data repository instead of just a view into the data

when you pull it out from whatever database originally put it in a in memory database locally and then you can use sql to search that and display whatever rows you find that match your criteria

and since its all local you can reset and reload the list with all the data you originally brought down

this way you separate “the data” from “the view of the data of interest” which is just a lot harder to do if your local storage IS also the view into the data

it leads you to look for “how to hide a row” which is not possible :stuck_out_tongue:

Thanks. That is a much better approach. It was easy to implement and works great.