Tree: Loading list data

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.