Telerik RadGrid_GridExporting

1 posts, 0 answers
  1. Munish
    Munish avatar
    13 posts
    Member since:
    Jul 2012

    Posted 13 Jul 2012 Link to this post

    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";
                using (FileStream fs = File.Create(gridfile))
                    Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
                    fs.Write(info, 0, info.Length);
Back to Top