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

RadBusyIndicator´s child

6 Answers 81 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thiago
Top achievements
Rank 1
Thiago asked on 01 Jun 2012, 03:07 PM
Hi,
I have a scenario where I´m creating programatically the RadBusyIndicator.
On this way, a set of controls need be disable when the proccess still executed.
But, same puting the IsRunning property true, the controls aren´t disable and I get an error, because I need the result of a assynchronous proccess to continue the execution flow.
Is there a way for define element childrens of RadBusyIndicator? This would be a solution, where the thread waits the result of assynchronous method.

Thanks in advance,

Thiago

6 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 06 Jun 2012, 03:11 PM
Hi Thiago,

I am not quite sure that I correctly understand the scenario.

It will be great if you could provide us with some sample source code or an entire project that we can use to get familiar with the case and see how we can help.

Please note that in order to be able to attach your project you will need to open a new support ticket.

Thanks for your time.

Kind regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Thiago
Top achievements
Rank 1
answered on 06 Jun 2012, 05:11 PM
A sample of my scenario:
The application should be able to get data from a service, and with the result, build  programatically the interface.
So, I´m calling an assynchronous method, and I need wait for its result to build the layout.
For this, I´ve added a RadBusyIndicator in my page.
Before call the method, I set the property IsRunning = true, and in MethodCompleted callback, I put the property IsRunning = false.
My problem is that I have several calls to several methods, so, I need put this property to false in every callback.

Here are the method´s service calls:
ChartServiceClient Proxy = new ChartServiceClient();
 
Proxy.InnerChannel.Faulted += new EventHandler(InnerChannel_Faulted);

Proxy.GetChartDataCompleted += new EventHandler<
GetChartDataCompletedEventArgs>(Proxy_GetDataChartCompleted);
Proxy.GetCharDataAsync();

Proxy.GetGaugeSettingsCompleted += new EventHandler<GetGaugeSettingsCompletedEventArgs>(Proxy_GetGaugeSettingsCompleted);
Proxy.GetGaugeSettingsAsync();

Is this the better way to use RadBusyIndicator?
I´ve already read about Dispatcher, but don´t know how it can be used in this scenario..

Thanks in advance,
Thiago
0
Deyan
Telerik team
answered on 07 Jun 2012, 06:38 AM
Hi Thiago,

Based on the details that you are sharing I think that this is the way to go if you want to stop the busy indicator animation. Since you have a couple of logical points where this is semantically valid for your application - you have no choice but updating the IsRunning property in these callbacks.

Let me know if I can further assist you.

All the best,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Thiago
Top achievements
Rank 1
answered on 08 Jun 2012, 05:23 PM
Hi Deyan,
Thanks for the reply.
This was the main doubt, and now it´s solved.

Best wishes,
Thiago
0
Eugeniy
Top achievements
Rank 2
answered on 25 Jul 2012, 09:48 AM
At first - you can bind IsEnabled property of any control to your BudyIndicator.IsRunning Property, or you can invert the value by using converter:

<Button >
<Button.IsEnabled>
<Binding ElementName="rbi" Path="IsRunning"/>
</Button.IsEnabled>
</Button>

<Button Name="button2">
<Button.IsEnabled>
<Binding ElementName="rbi" Path="IsRunning">
<Binding.Converter>
<InvertBooleanConverter/>
<Binding.Converter>
</Binding>
</Button.IsEnabled>
</Button>
<RadBusyIndicator x:Name="rbi"/>

To call UI update from background thread use Dispatcher.BeginInvoke method
0
Eugeniy
Top achievements
Rank 2
answered on 25 Jul 2012, 09:49 AM
Oh, sorry, i see it's solved
Tags
BusyIndicator
Asked by
Thiago
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Thiago
Top achievements
Rank 1
Eugeniy
Top achievements
Rank 2
Share this question
or