kendo UI Treeview抛出一个异常 - r.Dragging不是一个函数

时间:2015-07-07 09:48:58

标签: kendo-ui kendo-treeview

我正在使用带有requirejs的kendo ui。我正在使用多个小部件,但是当我尝试初始化树视图时,我得到一个异常 - r.Dragging不是函数'

var inlineDefault = new kendo.data.HierarchicalDataSource({
          data: [
            { text: "Furniture", items: [
              { text: "Tables & Chairs" },
              { text: "Sofas" },
              { text: "Occasional Furniture" }
            ] },
            { text: "Decor", items: [
              { text: "Bed Linen" },
              { text: "Curtains & Blinds" },
              { text: "Carpets" }
            ] }
          ],
          dragAndDrop: false
        });

       $("#treeview").kendoTreeView({
          dataSource: inlineDefault
        });

例外是:

未捕获的TypeError:r.Dragging不是函数 f.ui.DataBoundWidget.extend.init @ kendo.all.min.js:格式化:18252(匿名函数)@ kendo.all.min.js:格式化:732

无法调试问题,我错过了一个依赖项(我有jquery)还是什么?该代码取自他们的例子......

1 个答案:

答案 0 :(得分:0)

尝试此修复

var inlineDefault = new kendo.data.HierarchicalDataSource({
          data: [
            { text: "Furniture", items: [
              { text: "Tables & Chairs" },
              { text: "Sofas" },
              { text: "Occasional Furniture" }
            ] },
            { text: "Decor", items: [
              { text: BED LINEN" },
              { text: "Curtains & Blinds" },
              { text: "Carpets" }
            ] }
          ]
        });

   $("#treeview").kendoTreeView({
      dataSource: inlineDefault,
      dragAndDrop: false
    });