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

RadAjaxLoadingPanel with EO.PDF

3 Answers 91 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Nelson
Top achievements
Rank 1
Nelson asked on 04 Nov 2011, 06:49 AM
Hi,

I want to show the Loading Panel when user click on the "print" button. For the printing function, i use the third party component "EO.PDF" to render the current page to PDF file. The pdf cannot show up when i click "Print" and when i click on the button again it showed error as follow.

Only items of type Telerik.Web.UI.IRadToolBarButton can initiate postbacks


The function works fine when i remove the loadingpanel. Please advise.

Cheers, 
Nelson

    <eo:ASPXToPDF ID="ASPXToPDF1" runat="server">
    </eo:ASPXToPDF>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rtbMain">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlContent" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="inline"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadToolBar ID="rtbMain" runat="server" Width="100%">
        <Items>
            <telerik:RadToolBarButton Text="Print" Value="Print" Width="80px">
            </telerik:RadToolBarButton>
         </Items>
    </telerik:RadToolBar>
    <asp:Panel ID="pnlContent" runat="server">
    </asp:Panel>

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

Codebehind
    Protected Sub rtbMain_ButtonClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadToolBarEventArgs) Handles rtbMain.ButtonClick
         If e.Item.Value = "Print" Then
             EO.Pdf.Runtime.AddLicense( "XXXXXX")
            ASPXToPDF1.RenderAsPDF("Report.pdf")
        End If
End Sub

Cheers, 
Nelson

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 08 Nov 2011, 03:48 PM
Hi Nelson,

I'm not completely sure how exactly the  "EO.PDF"  components works however note that export functionality does not works with ajax requests and this scenario are not supported. Please review the following online topics which elaborates on this matter:
http://www.telerik.com/help/aspnet-ajax/grid-export-with-ajax-enabled.html
http://www.telerik.com/help/aspnet-ajax/ajax-exclude.html
http://www.telerik.com/help/aspnet-ajax/grid-postback-from-grid-with-ajax-enabled.html

Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Elias
Top achievements
Rank 1
answered on 09 Dec 2011, 02:37 PM
Hi Nelson,

I have the same problem. After the exporting to excel, the print cause this error.

You've managed to solve this problem?

Thanks!
0
Nelson
Top achievements
Rank 1
answered on 12 Dec 2011, 02:13 AM
Hi  Elias, 

Cannot find any solution yet.
Tags
Ajax
Asked by
Nelson
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Elias
Top achievements
Rank 1
Nelson
Top achievements
Rank 1
Share this question
or