Hello,
I wan to ask, if there is some way to style .k-event div according to a variable in event template.
What I need to do for example is to make red border on events, that have attribude "conflict = true" like that:
<script id="event-template" type="text/x-kendo-template">
<div data-conflict="#:hasConflict#">
</div>
</script>
Or get value of "hasConflict" as a class of event or something like this.
I made some workaround with JQuery, going trough each event, search for attribute and toggle class.
$(".k-event").each(function () {
var conflict = true;
var conflictDiv = $(this).find("div[data-conflict]");
if ($conflictDiv.length >= 1) {
conflict = $conglictDiv.first().attr("data-conflict");
}
if (conflict) {
this.addClass("conflict");
}
else {
this.removeClass("conflict");
}
});
But it seems to much complicated and I'm afraid, that it can take lots of time, i we have lots of events on the sheduler, I'm looking for more system-like way, like setting event color as is described here: http://dojo.telerik.com/@D_Learning/iQuta/4.
Thanks fo any answer.