如何扩展调度程序议程视图以包含附加列 [英] How to extend scheduler agenda view to include additional column
问题描述
我正在使用 Kendo Scheduler 控件.默认情况下,它在议程"视图中显示日期"、时间"和事件".如何扩展调度程序议程视图以包含附加图像中所示的附加列?
我尝试了如下所示的模板.
在剑道初始化中,我添加了以下代码
视图:[{类型:议程",eventTemplate: $("#event-template").html()},],
但它没有按预期呈现:(
我尝试了以下网址 剑道论坛链接但它并没有将我重定向到任何解决方案.
添加自定义视图,当前存在的是day
、week
、month代码>、<代码>议程代码> &
timeline
,你必须制作一个扩展类,从kendo.ui
类扩展为我们提供的Kendo UI代码库示例.
我鼓励您遵循该示例,以便它可以正常用于 edit
、remove
和 recurrence
事件.因此,您应该研究一下,但是如果您的调度程序只显示简单 的事件,只想在现有视图中添加自定义列,您可以查看我的示例 这里.
我利用调度程序数据绑定事件并将必要的 DOM 写入调度程序的头部和主体,因此它会像您上面描述的那样反映.
希望这有助于..
I am using Kendo Scheduler control. By default it is showing "Date","Time" and "Event" in the "Agenda" view. How to extend scheduler agenda view to include additional column as shown in attached image?
I tried templates as shown below.
<script id="event-template" type="text/x-kendo-template">
<button class="edit-event" data-uid="#=uid#">Custom Column</button>
<div>Notes: #: notes#</div>
</div>
</script>
and in Kendo initialization,i added below code
views: [
{
type: "agenda",
eventTemplate: $("#event-template").html()
},
],
But it did not render as expected :(
I tried below url Kendo Forum link but it's not redirected me to any solution.
To add a custom view which current existing are day
, week
, month
, agenda
& timeline
, you have to make an extended class which extend from kendo.ui
class as Kendo UI code library example gave to us.
I encourage you to follow that example so it will work properly for edit
, remove
and recurrence
events. Therefore you should look into it, yet if you have scheduler that only display events with simplicity just want to add custom column inside existing view, you can see my example here.
I exploit scheduler data bound events and write necessary DOM to header and body of scheduler, so it will reflect just like what you had describe above.
Scheduler Custom View Code Library - recommended solution
Scheduler Custom Column Alternative
Hope this help..
这篇关于如何扩展调度程序议程视图以包含附加列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!