Kendo ui:未捕获类型错误:无法读取属性'至小写'的未定义
Kendo ui: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
我正在使用kendo ui树列表组件,并从远程源获取数据。数据源定义为:
$("#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;" } }
]
});
数据源url的响应是
[{"hasChildren":true,"hierarchy":"Kendo ui","location":"New York","id":1,"map":true}]
然而,当我运行应用程序时,它出现了一个错误,上面写着:
未捕获的类型错误:无法读取未定义的属性"toLowerCase"
我已经检查了模式定义,真的找不到哪里出了问题。有人知道为什么吗?
我发现我犯了什么错误,我应该使用TreeListDataSource
而不是HierarchicalDataSource
,这是主要原因。
相关文章:
- 将对象作为参数传递后的未定义属性
- 检查链接对象形式中未定义属性的最佳实践是什么
- PhantomJS中的evalute内部未定义属性
- 访问数字类型的未定义属性
- 如何处理未定义属性的未定义属性 javascript 类型错误
- 返回未定义属性的脚本
- 类型错误:无法读取 ng-repeat 的未定义属性
- JavaScript-Disqus如何处理其“;disqus_config”;包含未定义属性的函数
- 是对HTMLElement#样式的未定义属性的赋值的返回值,保证与赋值相同
- 最好检查未定义属性或设置为空
- 如何解决这个未定义属性的node.js错误?
- 如何在JavaScript中挽救对象的未定义属性?
- AngularJS和PHP -注意:未定义属性:stdClass
- 主干模型删除未定义属性
- if else子句中未定义对象的未定义属性
- Javascript数组问题:无法读取未定义属性
- 当尝试使用未定义属性进行筛选时,Lodash将排除项
- 在Javascript数组的中途未定义属性
- Knockout arrayForEach未定义属性
- javascript中未定义属性的简写,初始化和赋值属性