Hi,
I'm using KendoUI Scheduler and I'm grouping the events by "owner". The entity "owner" has got properties like:
{
name: 'Andrea',
id: '1',
pictureUrl: 'http://someurl.com/someresource'
}
I tried to inject a groupHeaderTemplate like this:
<script id="groupHeaderTemplate" type="text/x-kendo-template">
<strong style="color: red">#=text#</strong>
<img src="#= image#" alt="person" height="50" />
</script>
... initializing the scheduler like this:
$(".scheduler").kendoScheduler({
.
.
.
resources: [
{
field: "owners",
name: "Owners",
dataSource: [
{ text: myOwners[0].name, value: myOwners[0].id, image: myOwners[0].pictureUrl},
{ text: myOwners[1].name, value: myOwners[1].id, image: myOwners[1].pictureUrl},
{ text: myOwners[2].name, value: myOwners[2].id, image: myOwners[2].pictureUrl}
],
multiple: true,
title: "Owners"
}
]
});
Unforunately I get the error:
Uncaught ReferenceError: image is not defined
I've been looking around within the documentation but I didn't find a way to customize the model of the resources schema.
Am I missing something or is it actually impossible to achieve what I'm trying?
Thanks for the support!
Andrea
I'm using KendoUI Scheduler and I'm grouping the events by "owner". The entity "owner" has got properties like:
{
name: 'Andrea',
id: '1',
pictureUrl: 'http://someurl.com/someresource'
}
I tried to inject a groupHeaderTemplate like this:
<script id="groupHeaderTemplate" type="text/x-kendo-template">
<strong style="color: red">#=text#</strong>
<img src="#= image#" alt="person" height="50" />
</script>
... initializing the scheduler like this:
$(".scheduler").kendoScheduler({
.
.
.
resources: [
{
field: "owners",
name: "Owners",
dataSource: [
{ text: myOwners[0].name, value: myOwners[0].id, image: myOwners[0].pictureUrl},
{ text: myOwners[1].name, value: myOwners[1].id, image: myOwners[1].pictureUrl},
{ text: myOwners[2].name, value: myOwners[2].id, image: myOwners[2].pictureUrl}
],
multiple: true,
title: "Owners"
}
]
});
Unforunately I get the error:
Uncaught ReferenceError: image is not defined
I've been looking around within the documentation but I didn't find a way to customize the model of the resources schema.
Am I missing something or is it actually impossible to achieve what I'm trying?
Thanks for the support!
Andrea