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

The cancel button doesn't work under RadProgressArea

1 Answer 127 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jin
Top achievements
Rank 1
Jin asked on 13 Aug 2012, 07:44 AM
I have a button and a RadProgressArea button in one page to execute a batch job. When I click the button and wait for some time, I click the cancel button, it have no any response. Anybody know why?

  protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RadProgressArea1.Localization.UploadedFiles = "Completed Steps: ";
                RadProgressArea1.Localization.CurrentFileName = "Step: ";
                RadProgressArea1.Localization.TotalFiles = "Total Steps:";
            }
        }


        protected void RadButtonProcess_Click(object sender, EventArgs e)
        {
            RadProgressContext context = RadProgressContext.Current;
            context.SecondaryTotal = "100";
            for (int i = 1; i < 100; i++)
            {
                context.SecondaryValue = i.ToString();
                context.SecondaryPercent = i.ToString();
                context.CurrentOperationText = "Doing step " + i.ToString();
                if (!Response.IsClientConnected)
                {
                    //Cancel button was clicked or the browser was closed, so stop processing
                    break;
                }
                // simulate a long time performing the current step
                System.Threading.Thread.Sleep(100);
            }
        }



 <telerik:RadProgressManager runat="server" ID="RadProgressManagerCode" />
    <telerik:RadProgressArea ID="RadProgressArea1" runat="server" DisplayCancelButton="True"
        ProgressIndicators="FilesCountBar,
                          FilesCountPercent,                      
                          SelectedFilesCount,                      
                          CurrentFileName,                      
                          TimeElapsed">
    </telerik:RadProgressArea>

 <telerik:RadButton ID="RadButtonProcess" runat="server" Text="Process Comparision"
                    OnClick="RadButtonProcess_Click">
                    <Icon PrimaryIconCssClass="rbConfig" PrimaryIconLeft="4" SecondaryIconTop="4" />
                </telerik:RadButton>

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 15 Aug 2012, 02:26 PM
Hello,

 
I have tested the code locally and could not observe any unusual behavior. This issue may be caused because of some of the known limitation of RadProgerssArea that are listed here.

Please have in mind as well that the "Cancel" button does not work in Chrome as well as Safari(the first limitation) because of the way both these browser deals with the file upload and javascript. Please excuse us for this limitation of our control.

Hope this will be helpful.

Regards,
Plamen
the Telerik team
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 their blog feed now.
Tags
AsyncUpload
Asked by
Jin
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or