5 posts, 0 answers
  1. appdev
    appdev avatar
    223 posts
    Member since:
    Sep 2008

    Posted 05 Feb 2009 Link to this post

    i am trying to select 92000 records from the database. obivously, it will be a while
    but instead of displaying each bar every second or seomthing, the radprogressbar just wait until everything is finished and then display it in full bar. how can i stop that how can i make it the progress bar fill up slower? 


    While rs.Read


    RadProgressBar2.Value1 = i

    RadProgressBar2.Text =

    "Record " & i


    i = i + 1


    End While

    please help thank you


  2. appdev
    appdev avatar
    223 posts
    Member since:
    Sep 2008

    Posted 05 Feb 2009 Link to this post

    i put a radprogressbar2.refresh in there an i can see it and made it moves slower but i can't do anything with my form. i can't even move my form???? is the progress bar engine really heavy?
  3. Deyan
    Deyan avatar
    2147 posts

    Posted 06 Feb 2009 Link to this post

    Hi Duy,

    Thanks for writing.

    Could you please give us more details on how you organized your approach?

    Basically, when you want to use the RadProgressBar in the context of a lengthy operation you should implement a worker thread pattern. In other words, you should use additional thread to fetch and load the information from the database. This thread will also update the RadProgressBar which will work in the main thread of your application.

    Note that the default architecture of a Windows Forms application is organized in such a way, that the main thread manages the UI plus the operations that are executed behind, unless you explicitly create other thread(s) to do this. This is the reason why when you run a lengthy operation the GUI cannot be updated until the operation is finished.

    I hope this helps.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. David Parvin
    David Parvin avatar
    4 posts
    Member since:
    May 2010

    Posted 19 Sep 2011 Link to this post

    The problem is not with your progress bar but with the fact that the tight loop is not letting anything else happen.  Try putting a System.Windows.Forms.Application.DoEvents() into your loop and it will allow other things like moving your form to happen.
  5. Rishi
    Rishi avatar
    3 posts
    Member since:
    Dec 2011

    Posted 24 Apr 2012 Link to this post

    This solution worked for me
Back to Top