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

[Solved] can't download

1 Answer 130 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
saravana
Top achievements
Rank 1
saravana asked on 24 Jun 2009, 05:18 AM
Hi,
    I'm using Q1 2009 version, i have a grid in my web page with "telerik:GridTemplateColumn" which shows the Download link.

 

<telerik:GridTemplateColumn DataField="Download" HeaderText="" UniqueName="Download">

 

 

<ItemTemplate>

 

 

<asp:LinkButton CommandName="Download" ForeColor="#2176D3" ID="lbDAR_Download" runat="server"

 

 

Text="Download"></asp:LinkButton>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

In the Item Command of that grid i'm calling a function to download the file from the server.

Response.ClearHeaders()

 

Response.Clear()

Response.ContentType =

"application/pdf"

 

Response.AddHeader(

"Content-Disposition", "attachment; filename=" + AppDomain.CurrentDomain.BaseDirectory & sourceFile)

 

Response.WriteFile(AppDomain.CurrentDomain.BaseDirectory & sourceFile)

it works fine. But if i implement the ajax for this grid with the help of RadAjaxManager, the downloading is not working.

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid6">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid6" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Vista" />

- please provide me the solution.

-thanks,
-Saravana.

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 24 Jun 2009, 07:47 AM
Hello Saravana,

Please examine the following links:
Export from ajaxified grid
Export from ajaxified grid CL
Exclude controls from ajaxifying

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
saravana
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or