aspnet-js-aspxclientverticalgrid-dot-exportto-x28-format-x29.md
Exports a grid data to a file in the specified format.
ExportTo(
format: ASPxClientVerticalGridExportFormat
): void
| Name | Type | Description |
|---|---|---|
| format | ASPxClientVerticalGridExportFormat |
An ASPxClientVerticalGridExportFormat object specifying the export format.
|
Note
The ExportTo method is in effect if the ASPxGridExportSettings.EnableClientSideExportAPI property is set to true.
The following example illustrates how to use the ExportTo method for exporting the grid data.
<dx:ASPxVerticalGrid ClientInstanceName="verticalGrid" ID="ASPxVerticalGrid1" runat="server" Width="700px" AutoGenerateRows="False" DataSourceID="SqlDataSource3" KeyFieldName="ProductID">
<SettingsExport EnableClientSideExportAPI="true"></SettingsExport>
<Rows>
...
</Rows>
</dx:ASPxVerticalGrid>
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Export">
<ClientSideEvents Click="function(s, e) {
verticalGrid.ExportTo(ASPxClientVerticalGridExportFormat.Xls);
}" />
</dx:ASPxButton>
Exporting to Different Formats
See Also