I tried to use TreeList with mvc5.
kendoUI:
.kendoTreeList({
dataSource: {
type: "aspnetmvc-ajax",
transport: {
read: {
url: "/Common/CommonProductBomInfo",
type: "POST",
data: { ProductBom: GA.current.dialog.param },
},
//parameterMap: function (options, operation) {
// if (operation !== "read" && options.models) {
// return { models: kendo.stringify(options.models) };
// }
//}
},
schema: {
//data: "Data",
//total: "Total",
//errors: "Errors",
model: {
id: "id",
parentId: "parentId",
fields: {
id: { type: "string", nullable: false },
parentId: { type: "string", nullable: true }
},
expanded: true
}
}
},
filterable: true,
sortable: true,
height:490,
toolbar: ['excel'],
columns: [
{ field: "Part_Code", title: "PartCode", width: 200 },
{ field: "Part_Name", title: "PartName", width: 160 },
{ field: "Part_Size", title: "PartSize", width: 120 },
{ field: "Part_Model", title: 'PartModel', width: 120 },
{ field: "Part_Material", title: 'PartMaterial', width: 140 }
]
});
MVC:
DataSourceResult result = Business.CommonProductBom(Guid.Parse(ProductBom)).ToDataSourceResult(request);
return Json(result);
It is not working well.