Kendo ui 在剑道网格上使用自定义编辑器模板时忽略column.editor

Kendo ui 在剑道网格上使用自定义编辑器模板时忽略column.editor,kendo-ui,kendo-grid,Kendo Ui,Kendo Grid,在我的剑道网格的网格列定义中 { field: ProductId, title: 'Product', template: #= ProductName #', editor: MyProductSelector } 这与默认的弹出式编辑器配合得很好。但是当我有一个自定义编辑器模板时,它似乎忽略了列上的编辑器字段。并只渲染常规输入 我的模板上的输入如下所示: <div class="k-edit-label"> <label for="Product

在我的剑道网格的网格列定义中

{ field: ProductId, title: 'Product', template: #= ProductName #', editor: MyProductSelector }
这与默认的弹出式编辑器配合得很好。但是当我有一个自定义编辑器模板时,它似乎忽略了列上的编辑器字段。并只渲染常规输入

我的模板上的输入如下所示:

    <div class="k-edit-label">
        <label for="ProductIdInput">Product</label>
    </div>
    <div data-container-for="ProductIdInput" class="k-edit-field">
        <input id="ProductIdInput" name="ProductId" data-bind="value:ProductId">
    </div>

产品
自定义编辑器模板是否应该尊重列编辑器?

您必须在编辑模板中使用“数据源”

<div class="k-edit-label">
        <label for="ProductIdInput">Product</label>
    </div>
    <div data-container-for="ProductIdInput" class="k-edit-field">
        <input id="ProductIdInput" name="ProductId" 
               data-bind="value:ProductId"
               data-source="MyProductSelector">
    </div>

产品