ASPxClientVerticalGrid.ExportTo(format) Method

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

Declaration

ExportTo(format: ASPxClientVerticalGridExportFormat): void

Parameters

Name Type Description
format ASPxClientVerticalGridExportFormat

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.


<dx:ASPxVerticalGrid ClientInstanceName="verticalGrid" ID="ASPxVerticalGrid1" runat="server" Width="700px" AutoGenerateRows="False" DataSourceID="SqlDataSource3" KeyFieldName="ProductID"> 
<SettingsExport EnableClientSideExportAPI="true"></SettingsExport> 
    <Rows> 
    ...
    </Rows> 
</dx:ASPxVerticalGrid> 
<br /> 
<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