Hello,
I have a radgrid in one of the web pages and in the template column i am using RadAsyncUpload to upload the documents(including PDF). Saving the documents in the database is fine. My problem is with viewing the documents, after they are saved. I saw in some threads that opening these pdf docs in seperate radwindow is a way to achieve this. How do i do that?
1) Using the ExportPDF is the right way to do this?
2) RadBinaryImage still not supporting PDF format?
3) How do i send the binary data of the document to the RadWindow?
4) If i have multiple rows in the grid, then, do i have to select the row first and then click on export pdf?
5) If the file size is 1 MB. Obviously, i don't want to save the document without compressing or resizing it. How do i do that without decreasing the resolution, Since the document will be pulled up for reporting purpose in the future?
6) When i click the export button now, a new window is opening with grid information in it. It is not showing the document.
Where am i doing wrong?
I followed the demo link below.
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandradasyncupload/defaultcs.aspx?product=grid
http://blogs.telerik.com/vladimirenchev/posts/08-12-08/how-to-export-grid-to-pdf-file-and-show-the-result-using-the-window.aspx
Appreciate the help
Thanks
I have a radgrid in one of the web pages and in the template column i am using RadAsyncUpload to upload the documents(including PDF). Saving the documents in the database is fine. My problem is with viewing the documents, after they are saved. I saw in some threads that opening these pdf docs in seperate radwindow is a way to achieve this. How do i do that?
1) Using the ExportPDF is the right way to do this?
2) RadBinaryImage still not supporting PDF format?
3) How do i send the binary data of the document to the RadWindow?
4) If i have multiple rows in the grid, then, do i have to select the row first and then click on export pdf?
5) If the file size is 1 MB. Obviously, i don't want to save the document without compressing or resizing it. How do i do that without decreasing the resolution, Since the document will be pulled up for reporting purpose in the future?
6) When i click the export button now, a new window is opening with grid information in it. It is not showing the document.
Where am i doing wrong?
string url, path = ""; bool isExport = false; protected void Page_Load(object sender, EventArgs e) { url = String.Format("~/{0}.pdf", RadGrid1.ExportSettings.FileName); path = Server.MapPath(url); }protected void RadGrid1_GridExporting(object source, GridExportingArgs e) { if (File.Exists(path)) { File.Delete(path); } using (FileStream fs = File.Create(path)) { Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput); fs.Write(info, 0, info.Length); } Response.Redirect("~/frm_UploadDocs.aspx"); } protected void RadToolBar1_ButtonClick(object sender, RadToolBarEventArgs e) { if (e.Item.Value == "Export") { //RadGrid1.ExportSettings.ExportOnlyData = false; isExport = true; RadGrid1.MasterTableView.ExportToPdf(); } else if (e.Item.Value == "Delete") { if (File.Exists(path)) { File.Delete(path); } } }I followed the demo link below.
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandradasyncupload/defaultcs.aspx?product=grid
http://blogs.telerik.com/vladimirenchev/posts/08-12-08/how-to-export-grid-to-pdf-file-and-show-the-result-using-the-window.aspx
Appreciate the help
Thanks