[CLOSED] Show Open/Save File Dialog box and hide Ext.Net Window

  1. #1

    [CLOSED] Show Open/Save File Dialog box and hide Ext.Net Window

    Hi, I have a GridCommand that when clicked should show the browser's open/save as file dialog window to download a zip file. The code below works when setting Hidden = false inside the ext.net window, but I don't need the window and want to hide it. Any suggestions?

    <ext:CommandColumn runat="server" Width="50" >
                                 <ext:GridCommand Icon="PageWhiteCompressed" CommandName="Download" >
                                    <ToolTip Text="Download Application Files" />
                                <Command OnEvent="ReviewAppDetails" IsUpload="true" >
                                    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="{#{FellowshipGrid}.body};" />
                                        <ext:Parameter Name="command" Value="command" Mode="Raw"/>
                                        <ext:Parameter Name="SelectAcadYear" Value="record.data.acadYear" Mode="Raw" />
      protected void ReviewAppDetails(object sender, DirectEventArgs e)
            string commandValue = e.ExtraParams["command"].ToString();
            if (commandValue == "Download")
                string acadYear = e.ExtraParams["SelectAcadYear"].ToString();
                System.Text.StringBuilder url = new System.Text.StringBuilder();
                url.Append(acadYear.ToString() + "_" + applicantID.ToString() + ".zip");
                Window win = new Window
                    ID = "newDocument",
                    Title = "Download Zip File",
                    Icon = Icon.ApplicationKey,
                    Width = Unit.Pixel(1000),
                    Height = Unit.Pixel(600),
                    Maximizable = true,
                    Collapsible = false,
                    Modal = true,
                    Hidden = true
                ComponentLoader cloader = new ComponentLoader();
                cloader.Url = url.ToString();
                cloader.Mode = LoadMode.Frame;
                win.Loader = cloader;
    Last edited by Daniil; Jul 12, 2013 at 5:04 PM. Reason: [CLOSED]
  2. #2

    Try to set AutoRender to true.

    Also, I don't quite understand what is your scenario about this window? Do you use this window just to download a file? If you do, you can write the file directly to Response: http://examples2.ext.net/#/GridPanel...ort_Data_Ajax/
  3. #3
    You are right. I don't need to have a window at all. I just wrote the file to the Response. Thanks for the help!

Similar Threads

  1. Replies: 2
    Last Post: Apr 23, 2013, 12:19 PM
  2. [CLOSED] [#31] Show/Hide ComponentColumn Textfield
    By Antonio09 in forum 2.x Premium Help
    Replies: 7
    Last Post: Feb 14, 2013, 10:39 AM
  3. Replies: 1
    Last Post: Nov 02, 2012, 5:07 AM
  4. Download and open a file in a separate window
    By unaltro2 in forum 1.x Help
    Replies: 2
    Last Post: Jan 21, 2010, 12:55 PM
  5. Get the value from prompt dialog and save
    By CoolNoob in forum 1.x Help
    Replies: 5
    Last Post: Oct 23, 2009, 3:13 PM

Tags for this Thread

Posting Permissions