Sep 25, 2015, 8:30 AM
[CLOSED] Problem with DirectEvent function and response object
Hello
I have a DirectEvent fucntion called on a button click.
My function takes data from a grid and return them as an excel files through a response object like that :
I have a DirectEvent fucntion called on a button click.
My function takes data from a grid and return them as an excel files through a response object like that :
Response.Clear()
Response.Buffer = True
Response.AddHeader("Content-Disposition", "attachment;filename=" + FileName + " Export.xls")
Response.ContentEncoding = System.Text.Encoding.Default
Response.ContentType = "application/vnd.ms-excel"
Response.Write(GenHtmlTable(grd, WindowTitle)) 'here the magic (see below) <---this line generate excel file (kind of)
Response.End()
The problem occurs when I want to unmask client window that makes the call, I can't do that after response object : Ext.Net.X.Call("unMaskOnLoad", "myWindow")
neither I can use Success property od direct event call like that :<DirectEvents>
<Click OnEvent="ExportGridToExcel" Success="unMaskOnLoad('wndSpareListStock')">
<ExtraParams>
<ext:Parameter Name="data" Value="#{grdSpareListStock}.getRowsValues({selectedOnly : false})" Mode="Raw" Encode="true"></ext:Parameter>
<ext:Parameter Name="Grid" Value="grdSpareListStock" Mode="Value" Encode="False"></ext:Parameter>
</ExtraParams>
</Click>
</DirectEvents>
<Listeners>
<Click Handler="maskOnLoad('Please wait...','wndSpareListStock')"></Click>
</Listeners>
Could it be a workaround to such behavior?
Last edited by Daniil; Sep 29, 2015 at 5:42 PM.
Reason: [CLOSED]