如何扩展调度程序议程视图以包括其他列 [英] How to extend scheduler agenda view to include additional column

查看:101
本文介绍了如何扩展调度程序议程视图以包括其他列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Kendo Scheduler控件.默认情况下,它在议程"视图中显示日期",时间"和事件".如何扩展调度程序的议程视图,使其包括附加的列,如附件中的图像所示?

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.

推荐答案

要添加当前存在的自定义视图,该自定义视图为dayweekmonthagenda& timeline,您必须制作一个扩展类,该扩展类是从Kendo UI代码库示例提供给我们的kendo.ui类扩展的.

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.

我鼓励您遵循该示例,以便它对于editremoverecurrence事件均能正常工作.因此,您应该调查一下,但是如果您的调度程序仅显示具有 简单 的事件,而只想在现有视图中添加自定义列,则可以看到我的示例此处.

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.

我利用调度程序数据绑定事件,并将必要的DOM写入调度程序的标头和主体,因此它将像您上面所描述的那样反映出来.

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

计划程序自定义列替代

希望这项帮助.

这篇关于如何扩展调度程序议程视图以包括其他列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆