gridList.ExportSettings.FileName =
"test"
gridList.ExportSettings.OpenInNewWindow =
True
gridList.MasterTableView.ExportToPdf()
This is the grid:
<telerik:RadGrid ID="gridList" runat="server" EnableViewState="true" AllowMultiRowSelection="true" >
<MasterTableView TableLayout="Auto">
<Columns>
<telerik:GridBoundColumn DataField="Col1" DataType="System.String" HeaderText="Term Description"
UniqueName="TC_TermDescription" Visible="true" />
</Columns>
</MasterTableView>
<ClientSettings AllowColumnsReorder="false" ReorderColumnsOnClient="true" ClientEvents-OnGridCreated="gridCreated">
<Resizing ClipCellContentOnResize="true" AllowRowResize="false" EnableRealTimeResize="true"
ResizeGridOnColumnResize="true" AllowColumnResize="true" />
</ClientSettings>
</telerik:RadGrid>
8 Answers, 1 is accepted
Have you ajaxified the Grid? The exporting feature of the control work with regular postbacks only. You can refer the following help article to get more details on this regard.
Export from ajaxified grid
Thanks
Shinu
Putting the "ClientEvents-OnRequestStart="pnlRequestStarted"" on the RadAjaxPanel does not seem to do anything.
If I take the grid out of the panel I get:
Telerik.Web.Apoc.ApocException: internal-destination or external-destination must be specified in basic-link
Any ideas?
Thanks,
Amit
Protected Sub butExportToPDF_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'get rid of the attachment links for report
RadGrid1.Columns.FindByUniqueName("ShowAttachments").Visible = False
RadGrid1.MasterTableView.ExportToPdf()
End Sub
Ford
Is there a quick solution to displaying links when you export pdf from Radgrid?
Regards,
-DJ-
This problem occurs when you have an empty anchors. For example:
<
a
href
=
"#"
>some text</
a
>
The PDF parser considers this as an invalid link and throws an exception.
Kind regards,
Daniel
the Telerik team
Why? If I have a non-existent link, what does that matter to the export function? It's not going to show the actual link anyway, just show the text.
I have this same problem. I have a multi function column in which some rows are a link and other rows just show their text with no link in this particular column so those rows just have href="#".
This is by design. We will research whether it is possible to remove this limitation without introducing breaking changes.
Regards,
Daniel
the Telerik team
Indeed, this behavior is annoying so we decided to change it. You will be able to download an internal build containing this fix in the beginning of the next week.
Kind regards,
Daniel
the Telerik team