I am using v13.2.20132.2187 of Infragistics.
Basically I am trying to export data of two webgrids on the same web page to a single PDF but, it's not working.
Following is the sample code that I am using,
.aspx side
<ig:WebDocumentExporter Format="PDF" runat="server" ID="WebDocumentExporter" ExportMode="Download" DownloadName="ExportedData" />
.cs side
Report pdfReport = new Report();
ISection section = pdfReport.AddSection();
WebDocumentExporter.Export(grid1, pdfReport, section);
section = pdfReport.AddSection();
WebDocumentExporter.Export(grid2, pdfReport, section);
Hi Hristo,
This is working for me.
Thanks a lot for your support.
Hello Nilesh,
A possible approach is to handle the DocumentRowExported server event and set bottom margin for the grid container:
protected void WebDocumentExporter_DocumentRowExported(object sender, Infragistics.Web.UI.GridControls.DocumentGridRowExportedEventArgs e) { e.ContainingGrid.Margins.Bottom = 15; }
Please see my sample to check how this works. I hope it suits your scenario.
You can export the WebDataGrids onto the same pdf like this:
WebDocumentExporter.Export(grid1, grid2);
I will update this thread with information how you could place a separator between the grids, so they do not stick together in the pdf.