|
-
Oct 7th, 2001, 11:59 PM
#1
Thread Starter
New Member
List View Control
Hello
Am having a table which consists of 37000 rows. In my VB application am using List View Control, to which am adding 37000 rows. The loading time it is taking around 1 to 2 min, but when i use the command listview1.clear then it is taking nearly 15 to 17 min, to clear the list view control.
I had done this by using the windows common control service pack 3.0. After that to test i have changed the windows common control service pack 3.0. to 2.0, then for loading time it is taking maximum, but to clear the list view it is clearing with in seconds i.e. less than one min.
So suggest me how to over come this problem. Do we have any API control to add items in the list view control and clear the list view control.
-
Oct 8th, 2001, 02:05 AM
#2
Why in the world would you want to load that many rows into a Listview? Who is going to sift through 37000 rows?
I personally would sift through 100 let alone 37000. I don't mean to be rude, but maybe you should rethink the program design to break that amount into groups or something.
-
Oct 8th, 2001, 02:40 AM
#3
Well ...
Just an odd thought. If clearing a listview takes that much time, would it be better to create a listview at runtime, and instead of clearing it, just destroy that instance and create a new one?
vegesna, you can try using the Sheridan grid control, if you can afford to buy it. It's a very good control for such activities. It minimizes the resources used in reading all the data, by not reading all the records in the beginning. Based on the visible portion of the grid, it only loads as many records as are actually going to be required.
Or implement some clever technique to imitate the above-mentioned functionality in the Listview. Something like:
Code:
'Load First 100 Records
'Listview has records from 1 to 100.
'Track user scrolling.
'When user reaches record no. 70 or above in the list, discard the first 50 and load the next 50.
'The Listview now has records from 51 to 150.
.
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
|