Jul 11, 2013, 11:38 PM
[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" >
<Commands>
<ext:GridCommand Icon="PageWhiteCompressed" CommandName="Download" >
<ToolTip Text="Download Application Files" />
</ext:GridCommand>
</Commands>
<DirectEvents>
<Command OnEvent="ReviewAppDetails" IsUpload="true" >
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="{#{FellowshipGrid}.body};" />
<ExtraParams>
<ext:Parameter Name="command" Value="command" Mode="Raw"/>
<ext:Parameter Name="SelectAcadYear" Value="record.data.acadYear" Mode="Raw" />
</ExtraParams>
</Command>
</DirectEvents>
</ext:CommandColumn>
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("Documents/");
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;
win.Render();
}
}
Last edited by Daniil; Jul 12, 2013 at 4:04 PM.
Reason: [CLOSED]