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

How to show progress bar in inside of radwindow ?

3 Answers 312 Views
Window
This is a migrated thread and some comments may be shown as answers.
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Aravind asked on 15 Aug 2013, 08:27 AM
Hai
  I need to show the progress bar inside the radwindow ,if i click button it will take 1 to 2 mins for processing,so i need to show the progress bar when page is refreshed .

Regards
  Aravind

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 16 Aug 2013, 04:54 AM
Hi Aravind,

Please try the following code snippet that I have tried.

ASPX:
<telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true">
    <ContentTemplate>
        <telerik:RadButton ID="buttonSubmit" runat="server" Text="Start Processing" OnClick="buttonSubmit_Click">
        </telerik:RadButton>
        <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
        <telerik:RadProgressArea ID="RadProgressArea1" runat="server" />
    </ContentTemplate>
</telerik:RadWindow>

C#:
protected void buttonSubmit_Click(object sender, System.EventArgs e)
{
        UpdateProgressContext();
}
private void UpdateProgressContext()
{
    const int total = 100;
 
    RadProgressContext progress = RadProgressContext.Current;
    progress.Speed = "N/A";
 
    for (int i = 0; i < total; i++)
    {
        progress.PrimaryTotal = 1;
        progress.PrimaryValue = 1;
        progress.PrimaryPercent = 100;
 
        progress.SecondaryTotal = total;
        progress.SecondaryValue = i;
        progress.SecondaryPercent = i;
 
        progress.CurrentOperationText = "Step " + i.ToString();
 
        if (!Response.IsClientConnected)
        {
            break;
        }
 
        progress.TimeEstimated = (total - i) * 100;
        //Stall the current thread for 0.1 seconds
        System.Threading.Thread.Sleep(100);
    }
}

Let me know if it doesn't help you.
Thanks,
Shinu.
0
Accepted
Marin Bratanov
Telerik team
answered on 16 Aug 2013, 01:21 PM
Hi guys,

I would also advise on taking a look at the following thread that shows a different, easier approach: http://www.telerik.com/community/forums/aspnet-ajax/window/blocking-a-radwindow-while-processing.aspx. Nevertheless, if the expected delay is, indeed, several minutes, the progress area could be the better approach as it shows a more detailed indicator.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Rohit
Top achievements
Rank 1
answered on 30 May 2017, 01:12 PM

I'm creating an asp.net web app. I want to allow the user to upload one or more  files . After the upload starts I would like for the user to be able to navigate the website as desired( traverse to different web pages of web app). When the file(s) upload is complete I would like a pop up message to appear, wherever they are on the website, telling the user that the upload is complete.

Or RadProgressArea should display in a window even after user navigate to different page.Uploading and progress should not stop. Is this possible? I am in real nead of this.

Thanks 

Tags
Window
Asked by
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Shinu
Top achievements
Rank 2
Marin Bratanov
Telerik team
Rohit
Top achievements
Rank 1
Share this question
or