ASPxGridBase.ExportPdfToResponse() Method
Exports the grid’s data to the specified file in PDF format with the specified settings, and writes it to the response in binary format.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Remarks
This method writes files to the response and do not write them to storage (for example, a file system).
<dx:ASPxGridView ID="ASPxGridView1" runat="server" DataSourceID="CustomerReportsDataSource" />
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Export to XLS" OnClick="ASPxButton1_Click" />
protected void ASPxButton1_Click(object sender, EventArgs e) {
ASPxGridView1.ExportPdfToResponse();
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ExportPdfToResponse() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.