Skip to main content

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​

TopicDescription
Basic initializationLearn how to initialize a Tree
Initialization of a collapsed TreeLearn how to initialize a Tree in the collapsed state (Example)

Loading data into Tree​

TopicDescription
Loading data into TreeRead how to load the initial data into Tree
Initialization with config.dataThe 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 TreeCollectionThe example shows how to load data from an external TreeCollection
Auto-loading Tree itemsLearn how to build a Tree structure as users open items (Example)

Integration​

TopicDescription
Backend integrationLearn how to connect DHTMLX Suite to a backend (Demo)
OptimusLearn how to use the DHTMLX Optimus framework to build DHTMLX-based apps
(the recommended framework for apps with Suite components)
React integrationLearn how to use DHTMLX Tree with React (Demo)
Angular integrationLearn how to use DHTMLX Tree with Angular (Demo)
Vue integrationLearn 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.

TopicDescription
Configuring drag-n-dropLearn how to choose a drag-n-drop mode for items between trees (Example 1, Example 2)
Configuring drop behaviorLearn how to define the behavior of a dragged item (Example)
Copying items during drag-n-dropLearn how to copy an item to a target during drag-n-drop (Example)
Enabling/disabling key navigationLearn how to enable and disable key navigation (Example)
Activating inline editingLearn how to activate inline editing on Tree initialization (Example)
Enabling and configuring tooltipsLearn 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.

TopicDescription
Height of Tree itemsLearn how to set the height for Tree items (Example)
Setting template for rendering itemsLearn how to define a template for rendering items in Tree and add event handlers to HTML elements of the template (Example)
Applying custom iconsLearn how to add custom icons to Tree items (Example)
Applying custom icons in a data setThe example shows how to add custom icons when you prepare a data set
Custom toggle iconThe example shows how to customize the toggle icon
Styling (custom CSS)Learn how to customize the appearance of Tree (Example)
List of CSS classesThe 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​

TopicDescription
Setting / getting Tree stateLearn how to set and get the state of Tree items
(Example 1, Example 2)
Collapsing / expanding Tree itemsLearn how to collapse or expand one item or all items in Tree
(Example 1, Example 2, Example 3)
Setting focus on an itemLearn how to set focus on an item
Editing itemsLearn how to enable editing of a Tree item dynamically

How to use checkboxes of Tree items​

TopicDescription
Adding checkboxes to Tree itemsLearn how to add checkboxes for Tree items (Example)
Checking/unchecking checkboxesLearn how to check or uncheck the checkbox of a Tree item (Example)
Getting checked itemsLearn 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.

TopicDescription
Adding itemsLearn how to add new items into Tree (Example)
Updating itemsLearn how to update config options of a Tree item (for example, to change the value of an item) (Example)
Getting a parent itemLearn how to get the parent of an item
Removing itemsLearn how to remove items from Tree (Example)
Filtering dataThe example shows how to filter data in Tree
Sorting dataThe example shows how to sort data in Tree
TreeCollection APICheck the full TreeCollection API reference

How to work with selection​

In this section you will learn how to work with selection.

TopicDescription
Using selection functionalityLearn how to enable or disable selection, select and unselect items, and get the object of a selected item (Example)
Disabling selectionLearn how to disable item selection on Tree initialization (Example)

How to work with Tree events​

This section explains how to work with Tree events.

TopicDescription
Event basic rulesLearn the basic rules of event handling
Event handlingLearn how to attach, detach, or call Tree events (Example)

API reference​

In this section you will find the Tree API reference.

TopicDescription
Tree methodsCheck the list of Tree methods
Tree eventsCheck the list of Tree events
Tree propertiesCheck the list of Tree properties
TreeCollection APICheck 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.

TopicDescription
Touch supportLearn how to work with touch support (Example)
TypeScript supportLearn how to work with TypeScript
Accessibility supportLearn about accessibility support in Tree
AwaitRedrawLearn how to run code after the component renders

Any questions left?​


info

Do you need more functionality? Feel free to share your suggestions in the comments below!