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

ExporttoExcel is not working

3 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 16 Sep 2013, 09:31 AM
Hi All,

Export to excel is not working while using loading panel, without loading panel it is work fine. How to fix this is issue?

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Sep 2013, 09:36 AM
Hello,

For export functionality .net framework required Full-postback so it is not working with RadAjaxManager/UpdatePanel.

Thanks,
Jayesh Goyani
0
Sam
Top achievements
Rank 1
answered on 16 Sep 2013, 10:26 AM
Thanks for your response Jayesh. If exporttoexcel will not work with UpdatePanel, then how to  disable updatepanel  when exporttoexcel click? (like ajaxdisable (args.set_enableAjax(false);)

0
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Sep 2013, 12:28 PM
Hello,

Please try with the below code snippet.

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridCommandItem)
        {
            Button btncmd = (e.Item as GridCommandItem).FindControl("ExportToExcelButton") as Button;
            ScriptManager.GetCurrent(Page).RegisterPostBackControl(btncmd);
        }
    }

Also check below link for more information.

http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-within-the-updatepanel-i-can-not-export.aspx#1341586

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Sam
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Sam
Top achievements
Rank 1
Share this question
or