Hello,
In my treeview how do I display a different custom image if hasChildren is true.
Thanks,
Rich
$("#clientsTree").kendoTreeView({
dataTextField: "nodeName",
dragAndDrop: true,
dataSource: {
transport: {
read: {
url: "@Url.Action(MVC.UnityClientProfileManager.ClientProfile.GetAllParentClients())",
}
},
schema: {
model: {
id: "nodeId",
hasChildren: "hasChildren",
fields: {
//nodeId: { type: "string" },
nodeParentId: { type: "string" },
nodeName: { type: "string" },
clientId: { type: "number", nullable: true },
clientGuid: { type: "string", nullable: true },
}
}
}
},
{
"nodeId": "/52/",
"nodeParentId": "/",
"nodeName": "Preferred Materials, Inc",
"nodeLevel": 1,
"hasChildren": false,
"expanded": false,
"clientId": 52,
"clientGuid": "1f3c21db-319b-e311-9b61-00155de1f901"
},
{
"nodeId": "/78/",
"nodeParentId": "/",
"nodeName": "Rich Group",
"nodeLevel": 1,
"hasChildren": true,
"expanded": false,
"clientId": 78,
"clientGuid": "46fe584c-3165-e411-953e-00155de1f901"
}
In my treeview how do I display a different custom image if hasChildren is true.
Thanks,
Rich
$("#clientsTree").kendoTreeView({
dataTextField: "nodeName",
dragAndDrop: true,
dataSource: {
transport: {
read: {
url: "@Url.Action(MVC.UnityClientProfileManager.ClientProfile.GetAllParentClients())",
}
},
schema: {
model: {
id: "nodeId",
hasChildren: "hasChildren",
fields: {
//nodeId: { type: "string" },
nodeParentId: { type: "string" },
nodeName: { type: "string" },
clientId: { type: "number", nullable: true },
clientGuid: { type: "string", nullable: true },
}
}
}
},
{
"nodeId": "/52/",
"nodeParentId": "/",
"nodeName": "Preferred Materials, Inc",
"nodeLevel": 1,
"hasChildren": false,
"expanded": false,
"clientId": 52,
"clientGuid": "1f3c21db-319b-e311-9b61-00155de1f901"
},
{
"nodeId": "/78/",
"nodeParentId": "/",
"nodeName": "Rich Group",
"nodeLevel": 1,
"hasChildren": true,
"expanded": false,
"clientId": 78,
"clientGuid": "46fe584c-3165-e411-953e-00155de1f901"
}