This is a migrated thread and some comments may be shown as answers.

How to use Rad Waiting Bar

8 Answers 1351 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sasmita
Top achievements
Rank 1
Sasmita asked on 09 Jul 2008, 09:20 PM
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

8 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 11 Jul 2008, 04:22 PM
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
0
Sasmita
Top achievements
Rank 1
answered on 24 Jul 2008, 08:51 PM
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
0
Martin Vasilev
Telerik team
answered on 28 Jul 2008, 09:14 AM
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.
0
Hassan
Top achievements
Rank 1
answered on 01 Nov 2010, 08:18 PM
The link provided by nikolay is broken :-(
0
Richard Slade
Top achievements
Rank 2
answered on 02 Nov 2010, 02:56 PM
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
0
Nikolay
Telerik team
answered on 05 Nov 2010, 04:17 PM
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
0
Vance Smith
Top achievements
Rank 1
answered on 05 Mar 2011, 09:07 PM
The formatting of this article is messed up. Please fix!
0
Nikolay
Telerik team
answered on 10 Mar 2011, 08:03 AM
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!
Tags
General Discussions
Asked by
Sasmita
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Sasmita
Top achievements
Rank 1
Martin Vasilev
Telerik team
Hassan
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Vance Smith
Top achievements
Rank 1
Share this question
or