We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Export problems

Thread ID:

Created:

Updated:

Platform:

Replies:

120934 Oct 28,2015 04:34 PM UTC Oct 30,2015 04:48 AM UTC ASP.NET Web Forms 3
loading
Tags: Grid
Manolo
Asked On October 28, 2015 04:34 PM UTC

Hi,

In my project, I create user controls that contains a grid dinamically. I need export to excel this grids, and I have two problems:

1- If I want set all user controls inside a update panel, the export fail. I've read this document

https://www.syncfusion.com/kb/5442/how-to-export-the-data-when-grid-is-in-updatepanel

But my grids are in a user control and I don't know how assign the trigger.

2- If I export an individual grid, it works fine, but after, if I want export all grids with the button export all, it doesn't work

I attach a demo example with my problems. In the example you must "check all" all teams and push on "Generar Informe".

Thanks

Attachment: Tab_eaab5543.zip

Balaji Marimuthu [Syncfusion]
Replied On October 29, 2015 08:52 AM UTC

Hi Manolo,

Thanks for contacting Syncfusion support.

Query:1 1- If I want set all user controls inside a update panel, the export fail. I've read this document. But my grids are in a user control and I don't know how assign the trigger.

To set all user controls (Grid) inside a update pane,l we need to register the control id to postbackcontrol in page load function. Refer to the modified sample and code example as below.
Sample: Tab


[Default]

<asp:UpdatePanel runat="server" ID="updatePanel">

        <ContentTemplate>

            <div class="row">

                <asp:Panel runat="server" ID="panelReports">


                </asp:Panel>

               

            </div>

            </ContentTemplate>
    </asp:UpdatePanel>


[UserControl]

<ej:Grid ID="gridOperacionesTerminadasTipoOperacion" runat="server" AllowPaging="True" AllowFiltering="True" AllowScrolling="True" AllowSorting="True" OnServerExcelExporting="gridOperacionesTerminadasTipoOperacion_ServerExcelExporting">


. . .
            </ej:Grid>


[Usercontrol.cs]


public partial class DatosInformeGasTeam : System.Web.UI.UserControl

    {

        public Syncfusion.JavaScript.Web.Grid DataGrig { get { return gridOperacionesTerminadasTipoOperacion; } }


        protected void Page_Load(object sender, EventArgs e)

        {

            ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);

            scriptManager.RegisterPostBackControl(this.FindControl("gridOperacionesTerminadasTipoOperacion"))//control id
        }
}


Query: 2- If I export an individual grid, it works fine, but after, if I want export all grids with the button export all, it doesn't work

We suggest you to set the ej.isOnWebForms as true in button client side onclick event. Refer to the code example as below.



<ej:Button ID="btnExportAll" runat="server" Size="Large" Type="Button" Text="Export All" ShowRoundedCorner="true" OnClick="btnExportAll_Click"  ClientSideOnClick="btnClick"/>




function btnClick(args) {

             ej.isOnWebForms = true;
         }


Refer to the demo for button clientside event: http://asp.syncfusion.com/demos/web/buttons/clientsideevents.aspx

Regards,
Balaji Marimuthu

Manolo
Replied On October 29, 2015 12:02 PM UTC

Thanks a lot!

It works perfectly!

Balaji Marimuthu [Syncfusion]
Replied On October 30, 2015 04:48 AM UTC

Hi Manolo,

We are happy that the provided solution helped you.

Please get back to us if you need any further assistance. We will be happy to assist you.

Regards,
Balaji Marimuthu

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;