Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to export ASPxDataView control content to a PDF file

$
0
0

This example demonstrates how to export ASPxDataView control content to a PDF file. Currently, ASPxDataView does not support data export, therefore we suggest a workaround with two ASPxDataViews. One of the two ASPxDataView's has ASPxDataView.ClientVisible set to False and we export its data, the second ASPxDataView is only used to display data we export. In this example, we also use the ASPxHiddenField control to transfer data from the client side to the server. We handle the following events:  ASPxDataView.CustomCallbackASPxClientDataView.BeginCallbackASPxClientDataView.EndCallbackASPxButton.ClickASPxClientButton.Click.

First, we send a callback to an invisible ASPxDataView on ASPxClientButton.Click, then ASPxDataView html is obtained and written to ASPxHiddenField for each page on ASPxClientDataView.BeginCallback. Finally, a next callback is sent by handling the ASPxClientDataView.EndCallback event. The html-markup of every ASPxDataView page is first written to the session and then to a response using RichEditDocumentServer component on the server side.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>