More info....
=20
The problem seems to be that it take much more time (about 40 times =
more) to add items to the ListView when its Parent property is set, or =
has been set at least once.
=20
So far, the solution to the problem is building the ListView =
programmatically, fill it, and then set its parent property. When I want =
to change the data in the Listview, I dispose it, create a new one, fill =
it then I set its parent property..
=20
Steph.
[quoted text, click to view] "Michael J. Salamone" <mikesa#at#entrek#dot#com> wrote in message =
news:eWJcxfKfFHA.3916@tk2msftngp13.phx.gbl...
How many items are we talking about here? And, is there any sorting =
going=20
on? If there is sorting, any chance the sorting is working any =
differently?=20
Quick test would be to turn sorting off and see if the timing changes.
You might also put Spy++ on it and see if there is anything unusual /=20
unexpected.
I don't suppose you've made it a virtual listview?
--=20
Michael Salamone [eMVP]
Entrek Software, Inc.
www.entrek.com [quoted text, click to view] "Steph." <steph@nomail.com> wrote in message=20
news:uCIpp2JfFHA.1444@TK2MSFTNGP10.phx.gbl...
Hi !
I use a ListView in a form to display Data from an SQL db.
My problem is that I can fill the listview in less than a second when =
I=20
show the form AFTER filling the listview, but I take 35 seconds if I =
show=20
the form BEFORE filling the listview !!!
Yes I call ListView's BeginUpdate()/EndUpdate() methods, I tried with =
hiding the ListView before filling it, I tried Suspend/resume Layout,. =
nothing works, I still have to wait 35 seconds.. And the only =
difference is=20
that the form is shown before or after filling the listview !
Does anybody have an idea about that problem ???
Thanks for any help !
Steph.