Back to Devexpress

ASPxClientVerticalGrid.ExportTo(format) Method

aspnet-js-aspxclientverticalgrid-dot-exportto-x28-format-x29.md

latest1.8 KB
Original Source

ASPxClientVerticalGrid.ExportTo(format) Method

Exports a grid data to a file in the specified format.

Declaration

ts
ExportTo(
    format: ASPxClientVerticalGridExportFormat
): void

Parameters

NameTypeDescription
formatASPxClientVerticalGridExportFormat

An ASPxClientVerticalGridExportFormat object specifying the export format.

|

Remarks

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.

aspx
<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>

Online Demo

Exporting to Different Formats

See Also

EnableClientSideExportAPI

Export Vertical Grid Data

ASPxClientVerticalGrid Class

ASPxClientVerticalGrid Members