-
Search listview
Dear programmers,
I'm working on a program that aids in playing a game. It holds statistics for virtual buying and selling. Since database programming is new to me, I linked a listview to an excel sheet. It writes data to it and reads from it. Works fine. Now in my little app I would love an option to search the vb listview (which in form_load loaded data from the excel sheet and populated the LV) on a specific string. It must search the entire listview (text, subitems) for this string and then go on to the next occurence until it isn't found in the listview. To illustrate:
The column headers are simplified as follows:
[ID] [Username] [Sold] [Bought] [Notes] [ETC]
Now let's say you've got some data:
[ID] [Username] [Sold] [Bought] [Notes] [ETC]
001 MyUser 10.000 1000 No notes .....
Now i would like to design a windows (called from a menu item mnuSearch) that has two options: a dropdown list saying Filter (with options ID, USERNAME, SOLD, BOUGHT, NOTES) and a textbox named value. This way the user may choose what filter to search on and the value for that filter.
Now I really really would love the listbox to empty and display all ocurrences only. So if the user searches for filter USERNAME and value MyUser then all occurences should be listed, BUT not only the value but the entire line (text, sub items, etc) so in this particular case if the example data was found at row 20m the first entry in the emptied list box should be ALL data listed above and the second row should contain the second occurence of the search string, but again with all columns filled in (not only the found value)
This way they may filter on username or ID and return only relevant results. I hope i'm not asking too much, but if someone could help me out please
A million thanks in advance
Hans
Netherlands
Similar Threads
-
By vb_programmer in forum VB Classic
Replies: 1
Last Post: 09-16-2006, 07:37 PM
-
By Urbaud in forum VB Classic
Replies: 6
Last Post: 07-08-2006, 10:48 PM
-
By stevemonty in forum ASP.NET
Replies: 0
Last Post: 08-31-2005, 07:06 AM
-
By Larry Serflaten in forum Talk to the Editors
Replies: 3
Last Post: 02-04-2002, 10:54 AM
-
By Larry Serflaten in forum Talk to the Editors
Replies: 3
Last Post: 07-16-2001, 02:30 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks