インライン編集で剣道グリッドを実装する場合、個々のフィールドごとにカスタム エディターを指定することができます。たとえば、次のような構成を使用して実行できます。
columns: [
{ field:"ProductName",title:"Product Name" },
{ field: "Category", width: "150px", editor: categoryDropDownEditor },
{ field: "UnitPrice", title:"Unit Price", format: "{0:c}", width: "150px" },
{ command: "destroy", title: " ", width: "110px" }],
editable: true
ここで、categoryDropDownEditor のコードは次のようになります。
function categoryDropDownEditor(container, options) {
$('<input data-text-field="CategoryName" data-value-field="CategoryName" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: false,
dataSource: {
type: "odata",
transport: {
read: "http://demos.kendoui.com/service/Northwind.svc/Categories"
}
}
});
}
ここで起こることは、categoryDropDownEditor 関数が、その特定のフィールドに対して、エディターの実際のマークアップを作成することです。あなたの場合、残された唯一のことは、ドロップダウンリストの代わりに AutoComplete ウィジェットを実装することです。この例は、剣道 UI のデモ ページから取得したものです。
あなたの質問に答えてくれることを願っています!