Export Data into XML, Excel or CSV using a full PostBack

  1. #1

    Export Data into XML, Excel or CSV using a full PostBack

    Hi

    I am using this "https://examples2.ext.net/#/GridPane...Data_PostBack/" example and it work great, but my problem is when my report takes a few seconds even up to 1 minute, so all I want is to show a mask while the report is being build. I am building the Excel when the button is clicked, because only at that stage I have all the parameters for the Excel report. The highlighted line is the only addition to your example.
    I have tried a long server side process, but then I can not use this.Response.

    Any ideas are welcome.

    string strXml = xml.OuterXml;
            System.Threading.Thread.Sleep (10000);
            this.Response.Clear();
            this.Response.AddHeader("Content-Disposition", "attachment; filename=submittedData.xml");
            this.Response.AddHeader("Content-Length", strXml.Length.ToString());
            this.Response.ContentType = "application/xml";
            this.Response.Write(strXml);
            this.Response.End();
    Last edited by geoffrey.mcgill; Nov 12, 2012 at 5:17 PM. Reason: please use [CODE] tags
  2. #2
    Hi,

    Maybe you can just show a Mask using client-side JavaScript as the process starts:

    Ext.net.Mask.show({ msg : "testing" })
    If you're doing full postback, then the Mask will automatically be destroyed when the page refreshes.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Hi

    I have tried it and it does show, but it still continues forever, any idea how to stop it?

    JR

Similar Threads

  1. MVC Razor - export data to excel or csv
    By Ishrath in forum 2.x Help
    Replies: 4
    Last Post: Nov 14, 2012, 11:39 AM
  2. How can Export data from GridPanel to Excel
    By delta in forum 2.x Help
    Replies: 2
    Last Post: Nov 14, 2012, 1:07 AM
  3. Export Data to XML using full postback
    By adeng in forum 2.x Help
    Replies: 0
    Last Post: Aug 11, 2012, 7:56 AM
  4. Export grid panel data to excel
    By sumesh in forum 1.x Help
    Replies: 0
    Last Post: May 19, 2012, 6:01 AM
  5. Replies: 3
    Last Post: Mar 16, 2010, 1:50 PM

Posting Permissions