My webdatagrid is styled with the Office2010Blue style and display very nicely on the webpage. I want to export the contents of the grid to pdf but without all the styling. No colours, plain Arial font with black grid lines, nothing else.
How do I do this?
Hello cjherasmus,
If you don't want styles to be exported, you can just disable it by setting EnableStylesExport = false
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3?page=Infragistics4.Web.v10.3~Infragistics.Web.UI.GridControls.BaseExporter~EnableStylesExport.html
Let me know if you need further assistance regarding this.
Hi Tsvetelina,
I'm aware of the EnableStylesExport property. However, there are no grid lines shown and that's what I require.
Regards
Casper
Hello Casper,
Thank you for your clarification.
In this case I recommend you using CellExported event in order to set Borders of all the cells.
<ig:WebDocumentExporter ID="WebDocumentExporter1" runat="server"
CustomFont="Arial, 9pt"
oncellexported="WebDocumentExporter1_CellExported">
</ig:WebDocumentExporter>
protected void WebDocumentExporter1_CellExported(object sender, Infragistics.Web.UI.GridControls.DocumentCellExportedEventArgs e)
{
e.ReportCell.Borders.All = new Infragistics.Documents.Report.Border(new Infragistics.Documents.Graphics.Pen(new Infragistics.Documents.Graphics.Color(System.Drawing.Color.Black)));
}
Let me know if you need further assistance regarding this
Tsvetelina,
The code in the CellExported event returns a NullReferenceException. I'm including the code snippets related to the DocumentExporter for you here:
<ig:WebDocumentExporter ID="WebDocumentExporter1" runat="server" DataExportMode="AllDataInDataSource" DownloadName="PDFExport" Margins="Narrow" TargetPaperOrientation="Landscape" TargetPaperSize="A4" ExportMode="Download" OnCellExported="WebDocumentExporter1_CellExported" CustomFont="Arial, 9pt"></ig:WebDocumentExporter>
protected void WebImageButton1_Click(object sender, Infragistics.WebUI.WebDataInput.ButtonEventArgs e){ if (WebDataGrid1.Rows.Count > 0) { WebDocumentExporter1.Export(WebDataGrid1); }}
protected void WebDocumentExporter1_CellExported(object sender, Infragistics.Web.UI.GridControls.DocumentCellExportedEventArgs e) { e.ReportCell.Borders.All = new Infragistics.Documents.Report.Border(new Infragistics.Documents.Graphics.Pen(new Infragistics.Documents.Graphics.Color(System.Drawing.Color.Black))); }
Thanks
Thank you for your confirmation.
Currently there is no mechanism about notification.
There is schedule of the service releases in our web site:
http://ko.infragistics.com/support/supported-environments.aspx#ServiceReleases
Hope this helps.
Problem solved after applying the lastest service release.
I wasn't aware that there were a service release. Is there some mechanism to inform us about services releases?
Thank you very much for your support.
I am not able to reproduce this.
I am using the latest service release of 10.3 version.
Can you please provide isolated sample in a zipped format reproducing the issue?
Hope hearing from you