|
-
Jan 23rd, 2000, 09:28 AM
#1
Thread Starter
New Member
I need to scroll a listview programmatically. Basically I have a very large database and I want to load the first 25 records and provide the user with a "next 25" button. When they press this button I will "add" another 25 items to the listview but I need to "scroll" the listbox up one page so records 26-50 show.
As an alternative, I'd also appreciate suggestions on how to handle this large database situation. Basically I have about 1 million names in a database. I am giving the user a search option that begins reading the database at the first name that matches, then I load the listview with 25 records. Perhaps there's another control or method out there to accomplish this. I obviously can't load the entire listview at once.
-
Jan 23rd, 2000, 09:52 AM
#2
Registered User
Why don't you use a DBList with SQL! I'm using:
SELECT * FROM Table1 WHERE tabNameCli like 'a*';
This is very fast even with 4000 records.
If you have 1 million the use at least 4 characters in the like clausule.
If you NEED use ListView I suggest you to use COMCTL32.OCX (Vs. 5.0) that is up to 20% faster then MSCOMCTL.OCX (Vs. 6.0).
I use a search that loads 600 itens in about 1.5 seconds, using images.
I don't konw how is the arquiteture of your network so I can't suggest you the best way.
E-mail me and we'll talk about, if you want!
[email protected]
Jefferon
-
Jan 23rd, 2000, 10:02 AM
#3
Thread Starter
New Member
Thanks for the reply. I cannot use SQL in this case because I am not connecting to an SQL database. But I just figured it out. I already had a ListItem variable that I was using to add SubItems with. All I had to do was do a itmX.EnsureVisible after loading the 25 records. This works like a charm. It's a shame little things like this aren't documented with good documentation from MS.
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
|
Click Here to Expand Forum to Full Width
|