<script>
var localData = [
{ id: 1, name: "A1", hasChild: true },
{ id: 2, pid: 1, name: "B1", hasChild: true },
{ id: 3, pid: 1, name: "B2" },
{ id: 4, pid: 1, name: "C2" },
{ id: 6, pid: 1, name: "D2" },
{ id: 8, pid: 2, name: "C2", selected: true },
{ id: 9, pid: 2, name: "D1" }
];
$('#itemList').ejDropDownTree({
treeViewSettings: {
fields: { id: "id", parentId: "pid", value: "id", text: "name", hasChild: "hasChild", dataSource: localData , selected: "selected" }
},
textMode: "fullPath",
fullPathDelimiter: "->"
});
</script> |