Hi,
I am using RadAjaxPanel and my girdview is under that panel. I have one template and under that template I have one button for report which opening a new report in a new page but the problem is that under ajax panel it doesn't work and if I remove my the ajax panel it works fine and open a new report in a new window. If this problem is with the response.write then how can I disable my ajax request for opening a report in a new window. Because I don't want to completely remove ajaxpanel or if you can provide some solution without disabling ajax request.
<telerik:RadAjaxLoadingPanel ID="alpProductionSechduleMain" runat="server" Height="75px"
MinDisplayTime="5" Width="75px">
<asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/Portals/0/Images/LoadingAjax.gif" />
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="rapPSMain" RequestQueueSize="5" runat="server" Width="100%"
OnAjaxRequest="rapPSMain_AjaxRequest" EnableOutsideScripts="True" HorizontalAlign="NotSet"
ScrollBars="None" LoadingPanelID="alpProductionSechduleMain" ><asp:GridView ID="gvJobs" runat="server" Width="100%" CellPadding="2" AutoGenerateColumns="False"
CssClass="gridviewSpacing gvJobs" AllowPaging="true">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkbtnEditJob" runat="server" CommandArgument='<%# Eval("JobKey")%>'
OnClick="lnkbtnEditJob_Click">edit</asp:LinkButton>
<asp:LinkButton ID="lnkbtnPrintJob" runat="server" CommandArgument='<%# Eval("JobKey")%>' OnClientClick="OpenReport(this);" >print</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField></Columns></asp:GridView></telerik:RadAjaxPanel>Protected Sub rapPSMain_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;filename=" & sFilename & ".htm")
Response.ContentType = "text/html"
Protected Sub rapPSMain_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;filename=" & sFilename & ".htm")
Response.ContentType = "text/html"
Dim eEncoding As Encoding = Encoding.GetEncoding("Windows-1252")
Dim eUnicode As Encoding = Encoding.Unicode
Dim byUnicodeBytes As Byte() = eUnicode.GetBytes(sData)
Dim byEncodedBytes As Byte() = Encoding.Convert(eUnicode, eEncoding, byUnicodeBytes)
Response.BinaryWrite(byEncodedBytes)
Response.Flush()
Response.End()
End Sub
I am using RadAjaxPanel and my girdview is under that panel. I have one template and under that template I have one button for report which opening a new report in a new page but the problem is that under ajax panel it doesn't work and if I remove my the ajax panel it works fine and open a new report in a new window. If this problem is with the response.write then how can I disable my ajax request for opening a report in a new window. Because I don't want to completely remove ajaxpanel or if you can provide some solution without disabling ajax request.
<telerik:RadAjaxLoadingPanel ID="alpProductionSechduleMain" runat="server" Height="75px"
MinDisplayTime="5" Width="75px">
<asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/Portals/0/Images/LoadingAjax.gif" />
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="rapPSMain" RequestQueueSize="5" runat="server" Width="100%"
OnAjaxRequest="rapPSMain_AjaxRequest" EnableOutsideScripts="True" HorizontalAlign="NotSet"
ScrollBars="None" LoadingPanelID="alpProductionSechduleMain" ><asp:GridView ID="gvJobs" runat="server" Width="100%" CellPadding="2" AutoGenerateColumns="False"
CssClass="gridviewSpacing gvJobs" AllowPaging="true">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkbtnEditJob" runat="server" CommandArgument='<%# Eval("JobKey")%>'
OnClick="lnkbtnEditJob_Click">edit</asp:LinkButton>
<asp:LinkButton ID="lnkbtnPrintJob" runat="server" CommandArgument='<%# Eval("JobKey")%>' OnClientClick="OpenReport(this);" >print</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField></Columns></asp:GridView></telerik:RadAjaxPanel>Protected Sub rapPSMain_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;filename=" & sFilename & ".htm")
Response.ContentType = "text/html"
Protected Sub rapPSMain_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;filename=" & sFilename & ".htm")
Response.ContentType = "text/html"
Dim eEncoding As Encoding = Encoding.GetEncoding("Windows-1252")
Dim eUnicode As Encoding = Encoding.Unicode
Dim byUnicodeBytes As Byte() = eUnicode.GetBytes(sData)
Dim byEncodedBytes As Byte() = Encoding.Convert(eUnicode, eEncoding, byUnicodeBytes)
Response.BinaryWrite(byEncodedBytes)
Response.Flush()
Response.End()
End Sub