Hi Justin,
I did try using the BackgroundWorker for loading the data but it did not
work out for me. The way i approached it was to start the BackgroundWorker
component to start loading when the form object was created in its
constructor. But this does not solve the problem, when the user clicks on the
combobox right after the form appears the combobox is empty and stays empty.
Is there any way that the combobox can be slowly loaded without delaying the
form from showing up. Also the combobox datasource is set to the results from
a stored procedure.
Is there a technique to aynchronously load the data into the combobox as and
when the data comes in?
Thank You,
Vish
"Justin Swan (MSFT)" wrote:
Hi Vish, you should look into using the BackgroundWorker component, this will
let you perform these long tasks without freezing up your interface:
http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx
Hope that helps!
"Vish" wrote:
Hi,
I am having a problem with my form being too slow to load up. I have a 4-5
of comboboxes on the form that load a lot (~30,000 records) into them. So
this is causing a lot delay (5-6 seconds) for the form to load. Most of the
time the form will be used for viewing data only. But sometimes the data can
be edited. I am trying to reduce the startup time of the form when the clicks
to load it. I was wondering if i could load the data in the comboboxes in the
background asynchronously. I am getting the data to be loaded in a DataReader
from a stored procdure. Does any one have any suggestions on how best this
can be accomplised. Any and all ideas will be greatly appreciated.
Thank you,
Vish