【问题标题】:How to use remote kendo Datasource as filter for Kendo Scheduler如何使用远程剑道数据源作为剑道调度器的过滤器
【发布时间】:2015-09-22 20:24:16
【问题描述】:

我可以从 kendo 自己的演示 (http://demos.telerik.com/kendo-ui/scheduler/index) 中看到,您可以使用复选框来过滤人员。我想做类似的事情,但我有一个单独的远程剑道数据源来拉“代表”。这些代表在我的调度程序小部件的自定义编辑器的下拉列表中表示,但我希望能够按我的数据源进行过滤。你能用一个提取远程数据而不是像它们显示的硬编码值的剑道 DS 来做到这一点吗?

谢谢。

【问题讨论】:

  • 是的,你可以这样做。告诉我们你得到了什么
  • 我实际上最终弄明白了。我会发布一个详细的答案。感谢您的帮助!

标签: kendo-ui kendo-scheduler


【解决方案1】:

我通过调度程序在页面上使用另一位 HTML 解决了这个问题。

这样的……

 <!-- template for table -->
        <script id="event-template" type="text/x-kendo-template">
            <div class="schedule-template">
                <p>#: title #</p>

                <p>#: rep #</p>
            </div>
        </script>

然后在你的 JS 中,有这样的效果...

    $("#scheduler").kendoScheduler({
    date: new Date(),
    startTime: new Date("2015/9/13 07:00 AM"),
    endTime: new Date("2015/9/13 17:00"),
    height: 700,
    editable: {
        destroy: false,
        template: $("#editor").html(),
        window: {
            title: "Auction",
            width: 700
        }
    },
    eventTemplate: $("#event-template").html(),
    timezone: "Etc/UTC",

注意,eventTemplate 行

【讨论】:

    猜你喜欢
    • 2018-12-12
    • 2013-03-07
    • 1970-01-01
    • 1970-01-01
    • 2018-02-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多