0
votes

In my grid column definition for my kendo grid I have

{ field: ProductId, title: 'Product', template: #= ProductName #', editor: MyProductSelector }

This works fine with the default popup editor. But when I have a custom editor template, it seems to ignore the editor field on the column. And just renders the regular input.

The input on my template looks like this:

    <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>

Is the custom editor template supposed to honour the column editors?

1

1 Answers

0
votes

You have to use "data-source", to your edit template

<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>