Booleansetting.data.simpleData.enable

Overview[ depends on jquery.ztree.core js ]

Set zTree's node to accept the simple data format, when zTree is initialized or when ajax get / or when use addNodes method.

Don't have to generate the complex nested data.

Default: false

Boolean Format

true means: zTree's node accept the simple data format.

false means: zTree's node only accept the nested data format.

If set it is true, you must set the other attributes in 'setting.data.simpleData'. (e.g., idKey, pIdKey, rootPId) And let the data satisfy the parent-child relationship.

Examples of setting

1. use the simple data format

var setting = {
	data: {
		simpleData: {
			enable: true,
			idKey: "id",
			pIdKey: "pId",
			rootPId: 0,
		}
	}
};
var treeNodes = [
    {"id":1, "pId":0, "name":"test1"},
    {"id":11, "pId":1, "name":"test11"},
    {"id":12, "pId":1, "name":"test12"},
    {"id":111, "pId":11, "name":"test111"}
];
......