简体   繁体   English

Kendo ui:未捕获的类型错误:无法读取未定义的属性“toLowerCase”

[英]Kendo ui: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

I am using kendo ui treelist component, and fetching data from a remote source.我正在使用 kendo ui 树列表组件,并从远程源获取数据。 The data source definition is :数据源定义是:

$("#location-manage-grid").kendoTreeList({
    dataSource: new kendo.data.HierarchicalDataSource({
        transport: {
            read: {
                url: "api/getLocation",
                dataType: "json"
            }
        },
        schema: {
            model: {
                id: "id",
                location: "location",
                hierarchy: "hierarchy",
                hasChildren: "hasChildren",
                map: "map"
            }
        }
    }),
    height: 600,
    pageable: true,
    columns: [
        { field: "hierarchy", title: "Hierarchy", width: 250 },
        { field: "location", title: "location", width: 250 },
        { field: "map", title: "map", width: 250 },
        { title: "Edit", command: [ "edit", "destroy" ], width: 250,  attributes: { style: "text-align: center;" } }
    ]
});

The response of the datasource url is数据源 url 的响应是

[{"hasChildren":true,"hierarchy":"Kendo ui","location":"New York","id":1,"map":true}]

However, when I run the application, it has an error, which said:但是,当我运行应用程序时,它有一个错误,它说:

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined未捕获的类型错误:无法读取未定义的属性“toLowerCase”

I have checked the schema definition, and I really can't find where goes wrong.我检查了模式定义,我真的找不到哪里出了问题。 Does anyone know why?有谁知道为什么?

我发现我TreeListDataSource误,我应该使用TreeListDataSource而不是HierarchicalDataSource ,这是主要原因。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的TypeError:无法读取属性toLowerCase的未定义 - Uncaught TypeError: Cannot read property toLowerCase of undefined 未捕获的TypeError:无法读取未定义的属性“ toLowerCase” - Uncaught TypeError: Cannot read property 'toLowerCase' of undefined 未捕获的TypeError无法读取未定义的属性“ toLowerCase” - Uncaught TypeError Cannot read property 'toLowerCase' of undefined 未捕获的TypeError:无法读取未定义的属性'toLowerCase' - Uncaught TypeError: Cannot read property 'toLowerCase' of undefined 我有错误未捕获的TypeError:无法读取未定义的属性'toLowerCase' - I have the error Uncaught TypeError: Cannot read property 'toLowerCase' of undefined 未捕获的TypeError:无法在文本字段上读取未定义错误的属性“ toLowerCase” - Uncaught TypeError: Cannot read property 'toLowerCase' of undefined Error on text field 未捕获的类型错误:无法读取未定义的属性“toLowerCase”(待办事项列表应用程序) - Uncaught TypeError: Cannot read property 'toLowerCase' of undefined (Todo list application ) Elastic_Grid | “未捕获的TypeError:无法读取未定义的属性'toLowerCase'” - Elastic_Grid | “Uncaught TypeError: Cannot read property 'toLowerCase' of undefined” 获取错误未捕获的TypeError:无法读取未定义的属性“ toLowerCase” - Getting error Uncaught TypeError: Cannot read property 'toLowerCase' of undefined jsonp请求上的“ Uncaught TypeError:无法读取未定义的属性'toLowerCase'” - “Uncaught TypeError: Cannot read property 'toLowerCase' of undefined” on jsonp request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM