ASPxClientTreeList.ExportTo(format) Method
Exports tree list data to a file in the specified format.
Declaration
ExportTo(
format: ASPxClientTreeListExportFormat
): void
Parameters
Name | Type | Description |
---|---|---|
format | ASPxClientTreeListExportFormat | An ASPxClientTreeListExportFormat object specifying the export format. |
Remarks
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>
<br />
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Export">
<ClientSideEvents Click="function(s, e) {
treelist.ExportTo(ASPxClientTreeListExportFormat.Xls);
}" />
</dx:ASPxButton>
Online Demo
Exporting to Different Formats
See Also