I'm trying to set up a TreeView. My json data from the server has IDs and Parent IDs that contain what the hierarchy is. Root levels have parentId of "NULL". Can I not specify my hierarchy self-referentially like this? Do I HAVE to make an "items: []" sub-structure in my JSON for each parent node?
var ds = new kendo.data.HierarchicalDataSource({ transport: { read: function(e) { //JSON is returned here. Example [{id: 50, parentId: "NULL", name: "abc"}, {id: 51, parentId: 50, name: "xyz"}] } }, schema: { model: { id: "id", parentId: "parentId", fields: { id: { type: "number" }, parentId: { type: "number", defaultValue: 0 } } } } });