【问题标题】:Kendo UI Type Script IssueKendo UI 类型脚本问题
【发布时间】:2016-09-07 14:35:22
【问题描述】:

我已经从包管理器控制台安装了最新的 Kendo UI 类型定义文件,并将该文件包含在类型脚本中:

/// <reference path="../scripts/typings/kendo-ui/kendo-ui.d.ts" />

我也尝试安装以前的版本,但遇到了同样的问题:

drillDownDataSource: any = new kendo.data.TreeListDataSource({
        transport: {
            read: {
                url: 'StatutoryIncome/GetStatutoryIncomeStatementView/',
                dataType: "json",
                type: "POST",
                async: true,
                cache: true,
                autoBind: true, // This property is not accessible 
                data: function() {},
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {
                            models: kendo.stringify(options.models)
                        };
                    }
                }
            }
        },
    }
}

正如我在上面的代码中提到的 autobind 属性不可访问,即使我删除了 auto-bind 属性,parameterMap 函数也会出错。 kendoTreelist 的功能,如 content 也无法访问

【问题讨论】:

    标签: javascript jquery typescript kendo-ui kendo-asp.net-mvc


    【解决方案1】:

    基于KendoUI docsparameterMap 应该嵌套在transport 下而不是transport.read 下。

    据我所知autobind 不存在于DataSource 配置中,此配置元素通常在组件本身上可用。 (例如参见TreeList-Configuration

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多