This is a migrated thread and some comments may be shown as answers.

Telerik RadGrid_GridExporting

0 Answers 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Munish
Top achievements
Rank 1
Munish asked on 13 Jul 2012, 11:25 AM
I am using below code to avoid prompting for filename/path, while exporting telerik grid. In this if I remove last line response.redirect then it again started asking for filename/path. Can you please suggest any other way, because i dont to perform response.redirect after this action?


protected void RadGridData_GridExporting(object source, GridExportingArgs e)
        {
            string gridfile = "c:\\grid.pdf";
            files.Add(gridfile);
            using (FileStream fs = File.Create(gridfile))
            {
                Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
                fs.Write(info, 0, info.Length);
            }
            Response.Redirect(Request.Url.ToString());
        }

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Munish
Top achievements
Rank 1
Share this question
or