ASPxClientGridView.ExportTo(format) Method
In This Article
Exports a grid data to a file in the specified format.
#Declaration
TypeScript
ExportTo(
format: ASPxClientGridViewExportFormat
): void
#Parameters
Name | Type | Description |
---|---|---|
format | ASPx |
The export format. |
#Remarks
Note
The Export
method is in effect if the Enabletrue
.
The following example illustrates how to use the ExportTo
method for exporting the grid data.
<dx:ASPxGridView runat="server" ID="ASPxGridView1" ClientInstanceName="grid"
DataSourceID="CustomerReportsDataSource">
<SettingsExport EnableClientSideExportAPI="true"/>
</dx:ASPxGridView>
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Export to XLS">
<ClientSideEvents Click="function(s, e) {
grid.ExportTo(ASPxClientGridViewExportFormat.Xls);
}" />
</dx:ASPxButton>
#Online Demos
- Exporting to Different Formats
- Excel Data Aware Export
- Export Selected Records
- Export Master-Detail Records
- Export with Format Conditions
- Export with Data Cell Bands
- Context Menu
See Also