RadProgressArea appears on click of download

10 posts, 0 answers
  1. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 04 Jun 2015 Link to this post

    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?

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 09 Jun 2015 Link to this post

    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
  3. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 09 Jun 2015 in reply to Hristo Valyavicharski Link to this post

    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

  4. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 09 Jun 2015 Link to this post

    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
  5. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 10 Jun 2015 in reply to Hristo Valyavicharski Link to this post

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

  6. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 10 Jun 2015 in reply to Phanish Link to this post

    PFA the screenshot of the issue I'm facing on clicking th edownload link.
  7. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 10 Jun 2015 in reply to Phanish Link to this post

    Attachment
  8. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 11 Jun 2015 Link to this post

    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
  9. Fit2Page
    Fit2Page avatar
    363 posts
    Member since:
    Feb 2007

    Posted 13 Dec 2016 in reply to Hristo Valyavicharski Link to this post

    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

  10. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    354 posts

    Posted 14 Dec 2016 Link to this post

    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.
Back to Top