这是字段:
{ field: "category", title: "Category", width: 100, editor: categoryDropDownEditor },
自定义编辑器:
function categoryDropDownEditor(container, options) {
console.log('used editor')
$('<input data-text-field="category" data-value-field="category" data-bind="value:'+options.field+'"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: false,
dataSource: {
type: "json",
transport: {
read: "/api/notes/dumpcats"
}
}
})
}
也在model.fields中:
category: {
type: "combobox",
editable: true,
validation: { required: true }
},
没有错误,只是空的组合框以及输入类别时出错的输入框。
未捕获的类型错误:对象 [object Object] 的属性“_parse”不是函数