I have written custom header for Kendo Scheduler. Which rendered as below
The code used to arrive at above UI is below and worked like charm.(thanks to Dion Dirza),
<script id="tmpDateHeader" type="text/x-kendo-template">
<span class="k-nav-day" data-dt="#=kendo.toString(date, 'dd/MM/yyyy')#">
<u>#=kendo.toString(date, "dd/M")#</u> - ({dc}%)
</span>
</script>
$("#scheduler").kendoScheduler({
dateHeaderTemplate: kendo.template($("#tmpDateHeader").html())
}
Issue
Now, I am UPDATING one of the EVENTS in Kendo Scheduler. During this update, I want to manually change the column day header percentage based on some data, like from 1% to 5% (which will come from DB) without refreshing entire scheduler control.
Real time scenario : When I add more EVENTS for a day, the percentage should increase in column header. The logic to get the percentage and color is available in API.
Solution Approach
Here I think, I need to update the value using jQuery
Issue resolved: I just updated the data source on update fire.
You can take a look on data source change event. Now I suppose you have
Date
property in your Event model. You need to grab updated eventdate
and select matchdate header
with that.Here an example code:
You should take a look on their Documentation, so you can get scheduler's behavior like what it should be. Hope this help.