How to use Rad Waiting Bar

9 posts, 0 answers
  1. Sasmita
    Sasmita avatar
    19 posts
    Member since:
    Jul 2008

    Posted 09 Jul 2008 Link to this post

    Hi,

    I have a windows application. On one button click i am performing some long processing Task. I am trying to use a Rad Waiting bar to indicate the status of long-running operations. When i am starting the waiting bar in the same thread where my task is getting performed,  it looks like system is hung and does not show the Waiting bar also.

    I went through various articles and all  articles tell about starting the long running operation in a different thread.
    I do not want to do it in a separate thread.

    Is there any alternate way of showing the waiting bar without in a different Thread.

    Any kind of help is appreciated.

    sasmita
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 11 Jul 2008 Link to this post

    Hello Sasmita,

    There is no alternative approach in your case. You should put the long running operation in a different thread. Otherwise, your application will freeze and you will lose the user interaction, until the operation is done.

    For more information about using RadWaitingBar in such scenarios, please refer to this Knowledge Base article:
    Using RadWaitingBar to indicate the status of long-running operations.

    If you have additional questions, feel free to contact me.

    Regards,
    Nikolay
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sasmita
    Sasmita avatar
    19 posts
    Member since:
    Jul 2008

    Posted 24 Jul 2008 Link to this post

    Hi,

    My Long running process contains some methods that reads data from the UI and does some operation/calculation with that data.. Basically reading data from UI and Initialisation of controls takes much time. So i want to put this methods in adifferent method, but i am unable to put it as i am getting some Cross Thread Operation Error. It says You are trying access controls created on Main Thread

    Is there a way i can put this Long running process in a different thread and can show the waiting bar to the User.

    Any kind of help is appreciated
    Sasmita
  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 28 Jul 2008 Link to this post

    Hello Sasmita,

    Thank you for contacting me.
    Our controls are not thread-safe. You have to start the RadWaitingBar in the main (the UI thread) and the time-consuming operations in another thread. In this case you should not have any problems with your scenario. If you start, stop or perform any operation in RadWaitingBar using a call from another thread, the behavior would be unpredictable.

    If you have additional questions please write me back.

    Greetings,
    Martin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Hassan
    Hassan avatar
    10 posts
    Member since:
    Oct 2010

    Posted 01 Nov 2010 Link to this post

    The link provided by nikolay is broken :-(
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Nov 2010 Link to this post

    Hi Hassan, 

    here is a very simple example of showing a RadWaitingBar, and calling a Background Worker to perform a long running operation. 
    Hope that helps
    Richard

    Private Sub RadForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.RadWaitingBar1.StartWaiting()
        Me.BackgroundWorker1.RunWorkerAsync()
    End Sub
     
    Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, _
        ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
     
        ' Simulate some long work on a background worker thread
        For i As Integer = 0 To 10
            System.Threading.Thread.Sleep(1000)
        Next
    End Sub
     
    Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As System.Object, _
        ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
     
        Me.RadWaitingBar1.Visible = False
        Telerik.WinControls.RadMessageBox.Show("Done")
        Me.RadWaitingBar1.Dispose()
    End Sub
  8. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 05 Nov 2010 Link to this post

    Hi guys,

    Richard, thank you for your assistance. Your Telerik points have been updated for it.

    Hassan, the knowledge base article in question is no longer available at our site, because its content was included in our Courseware, section User Feedback >> Programming the User Feedback Controls. We will consider including this article in the product documentation as well.

    I hope this helps.

    Regards,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Vance Smith
    Vance Smith avatar
    36 posts
    Member since:
    Jun 2012

    Posted 05 Mar 2011 Link to this post

    The formatting of this article is messed up. Please fix!
  10. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 10 Mar 2011 Link to this post

    Hi Vance,

    The Knowledge Base article in question is hidden from the navigation on our site. Only its link is kept alive, because we did not want you to get the "Ooops. There is a problem with our server error" which appears for dead links. Still, please consider this article obsolete as the API it covers is now covered by our online documentation.

    Greetings,
    Nikolay
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
UI for WinForms is Visual Studio 2017 Ready