Hi,
I have a rad button in a rad window, with both client click and on server event. the page in which the rad window is there has a radajaxmanager and a rad grid. The server event handles the export of radgrid data to an excel, this is an ajax request. I do not want to use the gridexporting. The following code exports the file:
using (ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook())
{
var worksheet = wb.Worksheets.Add(datatable, fileName);
worksheet.Tables.First().ShowAutoFilter = false;
worksheet.Tables.First().Theme = ClosedXML.Excel.XLTableTheme.None;
httpContext.Response.Clear();
httpContext.Response.Buffer = true;
httpContext.Response.Charset = Encoding.UTF8.WebName;
httpContext.Response.AddHeader("content-disposition", string.Format("{0}{1}", "attachment;filename=", fileName));
httpContext.Response.ContentType = contentType;
using (System.IO.MemoryStream memoryStream = new System.IO.MemoryStream())
{
workbook.SaveAs(memoryStream);
memoryStream.WriteTo(httpContext.Response.OutputStream);
httpContext.Response.Flush();
httpContext.Response.End();
}
}
After exporting the file, the ClientEvents-OnResponseEnd of radajaxmanager is not firing in Safari browser on MAC, I want this event to be fired to hide an image. It is firing in IE and Chrome on both MAC and windows but not in Safari. Please suggest.
Thanks in advance.
Saravana