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.





Reply With Quote