In the OnExporting event I want to save the file and then cancel the exporting process , I mean I don't want user to download the file anymore.
protected void XyzTree_Exporting(object sender, TreeListExportingEventArgs e)
// here I need to know the name of the file that Telerik as given to the file. eg. "BOM Export of p046_Page1_20180108200522338.xls"
string path = Server.MapPath("~/MyFile.xls");
using (FileStream fs = File.Create(path))
Byte info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
fs.Write(info, 0, info.Length);
// this is where I want to stop the export process , As I have saved the file already.