Using a seperate thread to load a grid

Posted on 2007-08-01
Last Modified: 2010-04-23
I have a form which loads several hundred records, what I want to do is have a seperate thread which loads the data, so the main form shows then the data comes when it is ready. Rather than wait for the whoe thing. What is the best method of doing thisd, the backgroundworker component or something else?
Question by:rocky050371
    LVL 48

    Accepted Solution

    I think backgroundworker is the best practice, but you can also add a delay (using a time) to load all the information after the form opens.
    LVL 8

    Expert Comment

    you can create a thread in code using   System.Threading.Thread and have it fired at start up or on the push of a button.

    A great idea to not make the user wait but if if your only talking about a couple hundred records i would be more concerned on what is delaying their load.  A couple of hundred should load in a heart beat.


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now