[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Presentation
    [Expand]Appearances and Look And Feel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
     [Expand]Context Menus
     [Collapse]Export and Import Data
       Export TreeList Data
       Import Data
     [Expand]Print TreeList
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Export TreeList Data

Expanded Exporting Data

You can export the TreeList's data to a data store in XML format, without any additional libraries. Call the TreeList.ExportToXml method. There are two overloads of this method available, which permit you to store data to a file and a stream. The data which has been stored using the ExportToXml method can then be loaded using the TreeList.ImportFromXml method. Note that data can be loaded using this method only in Unbound Mode (when the TreeList.DataSource property is not set).

If the XtraPrinting Library is available, the TreeList's data can also be exported in HTML, MHT, PDF, RTF, Text and XLS formats. To export data in these formats, use the corresponding ExportTo... method provided by the control. For instance, the TreeList.ExportToPdf method allows the Tree List data to be exported in PDF format.

It's also possible to export the Tree List using a printable component link provided by the XtraPrinting Library. This approach is more flexible, as it allows you to customize the generated report (for instance, add report headers), and export the control in additional formats (such as BMP, GIF, PNG, etc). See the following links for more information:

Is this topic helpful?​​​​​​​