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
    [Collapse]Data Binding
      Bound Mode
      Tree Generation Algorithm in the Tree List
      Virtual Mode (Dynamic Data Loading) Using Events
      Virtual Mode by Binding to a Business Object
      Unbound Mode
      Unbound Columns
      Posting Data to a Connected Database in ADO.NET
    [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
    [Expand]Miscellaneous
   [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]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Bound Mode

Expanded Online Video

Learn how to create a Tree List control, bind it to data, and customize the control's view and behavior options.

 

The Tree List control can be bound to any traditional data source: a BindingSource, BindingList<T>, List<T>, DataTable, DataView and DataSet objects, objects that implement specific interfaces (e.g., IList, ITypedList and IBindingList), SQL data, XML data, Excel data sources, etc.

Use the following properties to perform binding.

More information is provided below.

Expanded TreeList Control Binding Specifics

Like other data-aware controls, the Tree List control provides the traditional TreeList.DataSource and TreeList.DataMember properties for binding. Use the latter property if the TreeList.DataSource is a DataSet object (DataSets can contain multiple tables).

Due to the hierarchical structure of Tree List nodes, the bound data source must contain two fields to identify the relationship between records. Assign these two field names to the following properties:

Besides these two properties, you also need to specify the TreeList.RootValue property, which allows the Tree List control to determine root nodes. Data source records that have the RootValue in the ParentFieldName field will be regarded as root nodes. To learn more about the node hierarchy setting-up, see the following topic:

Note

  • Although Tree List allows you to display records from an underlying data source as a plain list (the TreeList.KeyFieldName and TreeList.ParentFieldName properties must be empty), we recommend using the Data Grid control for this task.
  • Dynamic data loading (virtual mode) is not supported in bound mode.
  • To sort data, do not use the methods provided by the bound data source. Instead, sort data using methods provided by the Tree List control. See Sorting to learn more.

 

 

The topics in the following section describe common data-binding concepts and scenarios that are applied to the Tree List, Data Grid, and other data-aware controls.

Expanded General Data Binding Concepts

Expanded See Also

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