Hi there,
I have a problem in using the radListView with AJAX.
I have a problem in using the radListView with AJAX.
As you can see in the enclosed image I want the user be able to download a file. (radlistview.png)
When I enable AJAX an error occurs (error.png).
I use the following code:
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server"> <telerik:RadAjaxManagerProxy ID="rampRequest" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="paRequestListView"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="paRequestListView" LoadingPanelID="raLoadingPanel"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy> <asp:Panel ID="paRequestListView" runat="server"> <NMHG:RequestListView id="RequestListView" runat="server"></NMHG:RequestListView> </asp:Panel> </asp:Content>
protected void rlvRequest_ItemCommand(object source, RadListViewCommandEventArgs e)
{
//Download file
if (e.CommandName == "Download")
{
//show save as dialog
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename=" + RequestDownloadFileName + ";");
response.TransmitFile(ConfigurationManager.AppSettings.Get("Download directory") + RequestDownloadFileName);
response.End();
}
}
When I remove the <telerik:RadAjaxManagerProxy> tag from the code above i am able to download the file.
Any idea why my download not works when AJAX is enabled?
I also noticed the LoadingPanel for my RadListView is never shown. AJAX functions normal in my RadListView.
I use the same code for my RadGrids were the LoadingPanel is shown.
Regards,
Marcel