RadBusyIndicator´s child

7 posts, 0 answers
  1. Thiago
    Thiago avatar
    16 posts
    Member since:
    May 2012

    Posted 01 Jun 2012 Link to this post

    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
  2. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 06 Jun 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Thiago
    Thiago avatar
    16 posts
    Member since:
    May 2012

    Posted 06 Jun 2012 Link to this post

    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
  5. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 07 Jun 2012 Link to this post

    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 >>

  6. Thiago
    Thiago avatar
    16 posts
    Member since:
    May 2012

    Posted 08 Jun 2012 Link to this post

    Hi Deyan,
    Thanks for the reply.
    This was the main doubt, and now it´s solved.

    Best wishes,
    Thiago
  7. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 25 Jul 2012 Link to this post

    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
  8. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 25 Jul 2012 Link to this post

    Oh, sorry, i see it's solved
Back to Top
DevCraft banner