2
這裏的領域:kendoGrid:從JSON數據下拉框場
{ 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 }
},
沒有錯誤,只是空組合框沿輸入框出現類別輸入時出錯。
未捕獲的類型錯誤:對象[對象的對象]的屬性「_parse」不是一個函數
我使用的示例here
你可以在JSFiddle或JSBin中爲我們複製這個問題嗎?這會讓我們更容易排除故障。謝謝! –
對不起,不明白如何使用那些:/ – juk
沒問題!只需轉到jsfiddle.net或jsbin.com,您就可以複製您的問題。然後,我們可以分離該代碼並修復它。 –