BusyIndicator in closedHandler of InputPrompt

3 posts, 1 answers
  1. Stephan
    Stephan avatar
    29 posts
    Member since:
    May 2013

    Posted 03 Jun 2013 Link to this post

    Hi All,

    I'm using the RadInputPrompt to ask the user for some input. In the closedHandler delegate I'm starting an operation that may take up to some seconds. In the mean time I'd like to show the busy indicator but don't know how to do it. I tried to create a new instance in the closeHandler for the input prompt but the busy indicator won't show up. I guess it's because I didn't specify a parent. It would be great if I could just show start showing the busy indicator on the whole page while the closedHandler is running.

    Kind Regards,
    Stephan
  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 03 Jun 2013 Link to this post

    Hello Stephan,

    Thank you for your interest in RadInputPrompt.

    You can add the busy indicator to the page, as long as it is not running (IsRunning = false), it won't be visible. Then in the closed handler you can set the IsRunning property to true and display the indicator. Here's an example of how you can do this:
    RadInputPrompt.Show("Title",
        closedHandler: (closedArgs) =>
            {
                busy.IsRunning = true;
                Dispatcher.BeginInvoke(() =>
                    {
                        // Perform your time consuming actions here.
                        Dispatcher.BeginInvoke(() =>
                            {
                                busy.IsRunning = false;
                            });
                    });
            });

    Here, "busy" is the name of the RadBusyIndicator instance that you have added to your page.

    I hope this information helps. Let me know if you need additional assistance.

    Regards,
    Todor
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Stephan
    Stephan avatar
    29 posts
    Member since:
    May 2013

    Posted 05 Jun 2013 Link to this post

    Hi Todor,

    thanks for your answer. It was just to obvious to define the busy indicator on the page and just change isRunning in the closed handler accordingly. I didn't try but I'm sure it works.

    Thanks again,
    Kind Regards,
    Stephan
Back to Top