I made a simple TreeList.
The data from the server is simple JSON array.
[{"Description":"111","id":1,"Name":"CEO"},{"Description":"222","id":2,"parentId":1,"Name":"Jane"},{"Description":"333","id":3,"Name":"Tom"},{"Description":"444","id":4,"Name":"Susan"}]
TreeList java script code is below but this always display "No records to display"
When I remove "model" object under "schema" in DataSource It works well.
I don't know what is the problem.
Please help me to solve this proble.
var dataSource = new kendo.data.TreeListDataSource({
transport : {
read : {
url: "ReadAsset",
dataType: "json"
}
},
schema: {
model: {
id: "id",
parentId: "parentId",
expanded: true
}
}
});
$("#treelist").kendoTreeList({
dataSource: dataSource,
height: "99%",
columns: [
{ field: "Name" },
{ field: "Description" }
]
});