Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Expand]Nodes
    [Expand]Data Editing
    [Expand]Data Representation
    [Expand]Sorting
    [Expand]Filtering
    [Expand]Summaries
    [Expand]Appearances and Look And Feel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
    [Collapse]Miscellaneous
     [Expand]Context Menus
     [Collapse]Export and Import Data
       Export TreeList Data
       Import Data
     [Expand]Print XtraTreeList
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

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:

How would you rate this topic?​​​​​​​