aspnet-js-aspxclienttreelist-dot-exportto-x28-format-x29.md
Exports tree list data to a file in the specified format.
ExportTo(
format: ASPxClientTreeListExportFormat
): void
| Name | Type | Description |
|---|---|---|
| format | ASPxClientTreeListExportFormat |
An ASPxClientTreeListExportFormat object specifying the export format.
|
Note
The ExportTo method is in effect if the TreeListSettingsExport.EnableClientSideExportAPI property is set to true.
The following example illustrates how to use the ExportTo method for exporting the grid data.
<dx:ASPxTreeList ClientInstanceName="treelist" ID="ASPxTreeList1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="ProductID">
<SettingsExport EnableClientSideExportAPI="true" />
...
</dx:ASPxTreeList>
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Export">
<ClientSideEvents Click="function(s, e) {
treelist.ExportTo(ASPxClientTreeListExportFormat.Xls);
}" />
</dx:ASPxButton>
Exporting to Different Formats
See Also