I’m populating the WebListBox of an app from straightforward SQL queries and iterations over the returned rows. This works extremely well and always has - I like this method because there’s no dependancy on the type of backend dbase.
Now I want to let the user filter results based on data they enter into a text field, using the TextChanged event. This could mean putting the data into a local array to manipulate, vs. multiple round-trips to re-query database. There are a lot of ways to approach this so I’m hitting the forum to look for any tips and tricks that might save me from reinventing the wheel. Thanks in advance for any advice or insights!
Here’s a reference for why you should be using DataSource from both the original Web 2.0 architect and the current on-staff maintainer:
DataSource isn’t tied to a particular engine any more than your “straightforward SQL queries” are. If you need to support a different engine, just create a different DataSource. It’s actually easier to swap than your “straightforward SQL queries”.
I would recommend against trying to emulate a live-search TextChanged type filter unless you have the time to be implementing your own browser side JavaScript. From the constant posts about it, it seems WebListbox.SearchCriteria tends to deliver less than desirable results.