Incremental Search in the BrowseDialog


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Our old VFP Framework's search class worked so that when the user entered text in the search field, the results display would constantly update with the closest match. I would like to either add this capability to the SF default BrowseDialog by creating my own and inheriting your class or replace the existing behavior. I dont want to have problems down the road when you publish updates though. Can you point me in the right direction?



I am also quite interested how this works out from a performance standpoint, I remember once the person that taught me VFP -back in the day- showed me this function searching a table with over a million rows and it was instant.

Keith Chisarik
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, an incremental search in FoxPro was quite easy to develop, but with SQL Server, it's a bit more difficult because you're not working with directly connected data.  In fact, our browse functionality that is included with our current FoxPro medical software version includes incremental search functionality. 

If you want to include incremental search functionality to the BrowseDialog, you'll most likely have to do so by using the soure code file for the BrowseDialog and modifying it... there's not really any way to extend it and provide that functionality.  The reason being is that each type you type a character, you need to query the database for the proper data... and you'll end up with the functionality similar to an "auto-complete" textbox where as you type, it searches for possible options to complete for you.  You would also need to make these database queries asynchronous since you cannot pause the UI in between each keypress to retrieve the next set of records.  And when you get into asynchronous processing, you'll need to make sure you synchronize your thread through an ISynchronizeInvoke object on the main thread (usually the BrowseDialogForm itself).  Those topics are way more advanced than I have time to get into on the forum, but MSDN's documentation has lots of info on it if you search for "async calls" and "ISynchronizeInvoke".

Have fun with that Smile

Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
LOL ok thanks.

Keith Chisarik
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search