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

RadProgressArea appears on click of download

9 Answers 49 Views
ProgressArea
This is a migrated thread and some comments may be shown as answers.
Phanish
Top achievements
Rank 1
Phanish asked on 04 Jun 2015, 10:00 AM

I have an async upload control in my page along with a grid view wherein all the uploads are displayed. When I click on a line item in a grid I have a download file functionality. But, whenever I click on the download file link, the progress area appears which is not expected. the progress area is only meant for the upload control but not for the download. How do I sort this issue out?

9 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 09 Jun 2015, 06:53 AM
Hi Phanish,

The ProgressArea shouldn't appears if you don't update the RadProgressContext on the server:

RadProgressContext context = RadProgressContext.Current;


Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Phanish
Top achievements
Rank 1
answered on 09 Jun 2015, 01:45 PM

Hi Hristo

I tried using the above piece of code, but still the Progress Area shows on click of download link.

Any other alternative would really help.

Thanks 

Phanish

0
Hristo Valyavicharski
Telerik team
answered on 09 Jun 2015, 02:16 PM
Please paste your code here, so we can review it.

Thanks.

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Phanish
Top achievements
Rank 1
answered on 10 Jun 2015, 12:20 PM

This is the RadGrid method where the download occurs:  

protected void grdTaskUploadDocument_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{

    if (e.CommandName == "Download")
{
int TaskDocId = 0;
string filename = e.CommandArgument.ToString();
if (checkIfDirectoryExists("TaskDocFileUpload"))
{
FileInfo file = new FileInfo(Server.MapPath(string.Format(@"~/Files/{0}/TaskDocFileUpload/", Session["ClientName"].ToString()) + filename));
if (file.Exists)
{


Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("content-disposition", "attachment; filename=" + filename);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
RadProgressContext context = RadProgressContext.Current;
}

}
}

else{.........}

}

 

This is the Progress Area code in the aspx page :

<telerik:RadAsyncUpload ID="taskDocFileUpload" runat="server" Localization-Select="Browse" Width="227px" MaxFileInputsCount="1" EnableInlineProgress="false" AllowedFileExtensions=".xls,.xlsx,.doc,.docx,.pdf,.txt,.ppt,.pptx,.csv" OnClientValidationFailed="OnClientValidationFailed">
</telerik:RadAsyncUpload>
<telerik:RadProgressManager runat="server" ID="RadProgressManager1" />
<telerik:RadProgressArea runat="server" ID="RadProgressArea1" />

0
Phanish
Top achievements
Rank 1
answered on 10 Jun 2015, 12:28 PM
PFA the screenshot of the issue I'm facing on clicking th edownload link.
0
Phanish
Top achievements
Rank 1
answered on 10 Jun 2015, 12:28 PM
Attachment
0
Hristo Valyavicharski
Telerik team
answered on 11 Jun 2015, 07:30 AM
Phanish,

Could you try to remove the following line:

protected void grdTaskUploadDocument_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    if (e.CommandName == "Download")
{
int TaskDocId = 0;
string filename = e.CommandArgument.ToString();
if (checkIfDirectoryExists("TaskDocFileUpload"))
{
FileInfo file = new FileInfo(Server.MapPath(string.Format(@"~/Files/{0}/TaskDocFileUpload/", Session["ClientName"].ToString()) + filename));
if (file.Exists)
{
 
 
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("content-disposition", "attachment; filename=" + filename);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
RadProgressContext context = RadProgressContext.Current;
}
 
}
}
else{.........}
}

Does it help? 

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 13 Dec 2016, 11:36 AM

Hi,

 

I am trying to do the opposite here but can't get it to work.

 

A RadGrid with Download buttons, downloads from FTP location.

I placed RadProgressBar and RadProgressManager on the page.

 

Is it necessary to place a upload object on the page for the Progress to show?

I did that but still no Progress rendered...

 

Marc

0
Veselin Tsvetanov
Telerik team
answered on 14 Dec 2016, 11:17 AM
Hi Marc,

As far as I can understand, you want to track the download process and report it to the user, using RadProgressBar or RadProgressArea. If this is your case, I am afraid that none of the Telerik controls will allow you to to do that out-of-the-box. Nevertheless, if you decide to proceed with a custom implementation of the above, you could consult the resources, suggested in the following forum post.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ProgressArea
Asked by
Phanish
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Phanish
Top achievements
Rank 1
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Veselin Tsvetanov
Telerik team
Share this question
or