Load parent/child nodes into tree

Tutorial » Load parent/child nodes into tree

The most common way to represent a tree of nodes is to store a parentid with each node. This is also known as the adjacency list model. Loading these data directly into tree is not allowed. But we can convert it to standard tree data format before loading. The tree plugin offer a 'loadFilter' option function that can doing it. It provides a chance to change any incoming data. This tutorial shows how to use 'loadFilter' function to Load parent/child nodes into tree.

The parent/child nodes data

Create Tree using 'loadFilter'

Convert implementation

Download the EasyUI example:

easyui-tree-demo.zip