Features
This page helps you start working with DHTMLX Tree and explore its functionality in depth.
How to start with DHTMLX Tree
In this section you will learn how to initialize Tree, load data into it, and integrate it into your applications.
Initialization
| Topic | Description |
|---|---|
| Basic initialization | Learn how to initialize a Tree |
| Initialization of a collapsed Tree | Learn how to initialize a Tree in the collapsed state (Example) |
Loading data into Tree
| Topic | Description |
|---|---|
| Loading data into Tree | Read how to load the initial data into Tree |
| Initialization with config.data | The example shows how to load data into Tree during initialization |
| Initialization with data.load() | The example shows how to load data from an external file |
| Initialization with data.parse() | The example shows how to load data from a local data source |
| Initialization with external TreeCollection | The example shows how to load data from an external TreeCollection |
| Auto-loading Tree items | Learn how to build a Tree structure as users open items (Example) |
Integration
| Topic | Description |
|---|---|
| Backend integration | Learn how to connect DHTMLX Suite to a backend (Demo) |
| Optimus | Learn how to use the DHTMLX Optimus framework to build DHTMLX-based apps (the recommended framework for apps with Suite components) |
| React integration | Learn how to use DHTMLX Tree with React (Demo) |
| Angular integration | Learn how to use DHTMLX Tree with Angular (Demo) |
| Vue integration | Learn how to use DHTMLX Tree with Vue.js (Demo) |
How to configure Tree
In this section you will learn how to configure drag-n-drop in Tree, enable or disable key navigation, let users edit items with a double-click, and more.
| Topic | Description |
|---|---|
| Configuring drag-n-drop | Learn how to choose a drag-n-drop mode for items between trees (Example 1, Example 2) |
| Configuring drop behavior | Learn how to define the behavior of a dragged item (Example) |
| Copying items during drag-n-drop | Learn how to copy an item to a target during drag-n-drop (Example) |
| Enabling/disabling key navigation | Learn how to enable and disable key navigation (Example) |
| Activating inline editing | Learn how to activate inline editing on Tree initialization (Example) |
| Enabling and configuring tooltips | Learn how to enable and configure tooltips for Tree items (Example) |
How to customize Tree and change its size
In this section you will learn how to customize Tree and its icons, and how to set the height of Tree items.
| Topic | Description |
|---|---|
| Height of Tree items | Learn how to set the height for Tree items (Example) |
| Setting template for rendering items | Learn how to define a template for rendering items in Tree and add event handlers to HTML elements of the template (Example) |
| Applying custom icons | Learn how to add custom icons to Tree items (Example) |
| Applying custom icons in a data set | The example shows how to add custom icons when you prepare a data set |
| Custom toggle icon | The example shows how to customize the toggle icon |
| Styling (custom CSS) | Learn how to customize the appearance of Tree (Example) |
| List of CSS classes | The CSS classes included in the DHTMLX library |
How to work with Tree
In this section you will learn how to expand or collapse Tree items, work with their state, and more.
How to work with Tree items
| Topic | Description |
|---|---|
| Setting / getting Tree state | Learn how to set and get the state of Tree items (Example 1, Example 2) |
| Collapsing / expanding Tree items | Learn how to collapse or expand one item or all items in Tree (Example 1, Example 2, Example 3) |
| Setting focus on an item | Learn how to set focus on an item |
| Editing items | Learn how to enable editing of a Tree item dynamically |
How to use checkboxes of Tree items
| Topic | Description |
|---|---|
| Adding checkboxes to Tree items | Learn how to add checkboxes for Tree items (Example) |
| Checking/unchecking checkboxes | Learn how to check or uncheck the checkbox of a Tree item (Example) |
| Getting checked items | Learn how to get the list of all checked items in a tree (Example) |
How to work with data in Tree
In this section you will learn how to use the TreeCollection API to work with Tree data — add, update, remove, filter, and sort items.
| Topic | Description |
|---|---|
| Adding items | Learn how to add new items into Tree (Example) |
| Updating items | Learn how to update config options of a Tree item (for example, to change the value of an item) (Example) |
| Getting a parent item | Learn how to get the parent of an item |
| Removing items | Learn how to remove items from Tree (Example) |
| Filtering data | The example shows how to filter data in Tree |
| Sorting data | The example shows how to sort data in Tree |
| TreeCollection API | Check the full TreeCollection API reference |
How to work with selection
In this section you will learn how to work with selection.
| Topic | Description |
|---|---|
| Using selection functionality | Learn how to enable or disable selection, select and unselect items, and get the object of a selected item (Example) |
| Disabling selection | Learn how to disable item selection on Tree initialization (Example) |
How to work with Tree events
This section explains how to work with Tree events.
| Topic | Description |
|---|---|
| Event basic rules | Learn the basic rules of event handling |
| Event handling | Learn how to attach, detach, or call Tree events (Example) |
API reference
In this section you will find the Tree API reference.
| Topic | Description |
|---|---|
| Tree methods | Check the list of Tree methods |
| Tree events | Check the list of Tree events |
| Tree properties | Check the list of Tree properties |
| TreeCollection API | Check the TreeCollection API for working with Tree data |
Common functionality
In this section you will learn about common library functionality that is useful when you work with Tree.
| Topic | Description |
|---|---|
| Touch support | Learn how to work with touch support (Example) |
| TypeScript support | Learn how to work with TypeScript |
| Accessibility support | Learn about accessibility support in Tree |
| AwaitRedraw | Learn how to run code after the component renders |
Any questions left?
Do you need more functionality? Feel free to share your suggestions in the comments below!