私は次の剣道グリッドを持っています:
$("#teachers").kendoGrid({
dataSource: dataSource,
toolbar: ["create"],
columns: [
{ field: "employeeId", title: "Employee Id" },
{ field: "firstName", title: "First Name", editor: categoryDropDownEditor },
{ field: "lastName", title: "Last Name" },
{ field: "isHeadmaster", title: "Is a Headmaster?" },
{ command: ["edit", "destroy"], title: " ", width: "153px" }],
editable: 'popup'
});
私が抱えている問題はグリッドではなく、エディター テンプレートにあります。ご覧のとおり、ポップアップ編集を使用しており、フィールドの 1 つにオートコンプリート選択ウィジェットを提供したいと考えています。
categoryDropDownEditor
の定義方法は次のとおりです。
function categoryDropDownEditor(container, options) {
$('<input required data-text-field="CategoryName" data-value-field="CategoryID" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoAutoComplete({
dataSource: [
"Albania",
"Andorra",
"Armenia",
/* ... */
"Ukraine",
"United Kingdom",
"Vatican City"
],
filter: "startswith"
});
}
何を入力しても、オートコンプリート ウィジェットがまったく機能しません。提案はまったく表示されません。何が起こっているのか分かりますか?