TreeList Class
Displays data as a multi-column tree view. Can be used in either bound or unbound mode, with full support for data editing, validation, summaries, etc. See Tree List.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v18.1.dll
Declaration
[ToolboxTabName("DX.18.1: Data & Analytics")]
[TreeList.TreeListCustomBindingProperties]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "TreeList")]
[Docking(DockingBehavior.Ask)]
[DataAccessMetadata("All", SupportedProcessingModes = "Simple")]
public class TreeList :
EditorContainer,
IDirectXClient,
ISupportAsyncScrollAnimation,
ISupportExpandAnimation,
IControlRowSource,
IFilteringUIClient,
IFilterCriteriaBindingAware,
IPrintableEx,
IPrintable,
IBasePrintable,
IXtraSerializable,
INavigatableControl,
IToolTipControlClient,
IAppearanceOwner,
ISupportLookAndFeel,
IDXManagerPopupMenu,
IAccessibleGrid,
ISupportXtraAnimation,
IEvaluatorDataAccess,
IXtraSerializableLayoutEx,
ISupportXtraSerializer,
IGestureClient,
IServiceProvider,
IStringImageProvider,
IFilteredComponent,
IFilteredComponentBase,
ISearchControlColumnsClient,
ISearchControlClient,
IOptionsLayoutProvider,
IXtraSerializableLayout2,
IXtraSerializableLayout
Related API Members
The following members accept/return TreeList objects:
Remarks
The Tree List displays nodes organized into a hierarchy.
The control supports bound and unbound modes. In bound mode, data is loaded from an external data source specified by the TreeList.DataSource and TreeList.DataMember properties. The data source must contain two fields that provide information on parent-child relationships between records. These fields need to be assigned to the TreeList.KeyFieldName and TreeList.ParentFieldName properties.
In unbound mode, the TreeList is populated with nodes manually by calling specific node creation methods. You can create all nodes simultaneously, or create only root nodes initially, and then provide child nodes dynamically on demand, by handling an event. See Unbound Mode to learn more.
The following are main features supported by the control:
- Multiple columns.
- Sorting data against any number of columns.
- Summaries.
- Preview sections.
- Filtering data in multiple ways - i) Microsoft Excel Style Filter Dropdowns; ii)Auto Filter Row; iii) Advanced Filter Editor; iv)in code; v) by handling an event; vi) Find Panel
- Multiple cell in-place editors.
- Images in nodes.
- Runtime column customization
- Formatting column and summary values.
- Look-and-feel customization - Support for multiple paint schemes (skins, Flat, UltraFlat, etc.).
- Appearance customization.
The column collection can be accessed with the TreeList.Columns property. At design time, you can create columns using the Tree List Designer. See Columns for more information.
The collection of root level nodes can be obtained by reading the TreeList.Nodes property value. Child nodes of each node are stored in the node’s TreeListNode.Nodes collection. See Nodes for information on node objects, node structure and how to iterate through nodes.
Note
If the TreeList control is created at design time, changing the visual settings and size of the control and its elements (e.g., invoking the best fit functionality) is not in effect before the Tree List has completed its initialization. To customize these settings in the form’s System.Windows.Forms.Form.Load event handler, call the TreeList.ForceInitialize method prior to performing additional customization.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the TreeList class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.