The tree control, which needs to provide the JSON data in order to display properly.
Typically, developers can do this in the background:
1) Querying a list data from a database
2) in the background, convert the list data to tree-shaped data
3) return in JSON mode
On the foreground page, you can either set a URL address for the tree or call the Load method to load the tree data.
The "list to tree" in the background is a relatively small implementation of difficulty.
In response to this, MINIUI tree provides a way to directly load list data and transform the data inside the tree.
1) Querying a list data from a database
2) return in JSON mode
The original 2nd step is omitted.
How to achieve it?
You only need to set 3 properties for the tree: Valuefield, ParentField, Resultastree.
Valuefield is typically an ID that represents a unique identifier for a node object.
The ParentField is usually PID, which represents the parent node property.
Resultastree is the key, to be set to "false", so that the tree through the URL to load the data, you will be aware of the need to do some "list to tree" processing, so that the correct display.
Reference Example:
List data Generation tree:http://miniui.com/demo/tree/list2tree.html
Website: http://www.miniui.com/demo/
Tree: Loading list data