Hi,
I'm having trouble using my custom widget as a custom editor in a grid. It seems to call the init of my widget 3 times for every line. Also when I click on a cell with my widget, it disappears. The widget works correctly outside of the grid and binds fine. I want my grid to be inline edit with batch edit so it is permanently in edit mode like an Excel spreadsheet. Please can you help me see what I'm doing wrong. Thanks.
My grid definition:
<div
id="elgrid"
style="width: 750px; height: 350px"
data-role="grid"
data-editable="{mode: 'incell', createAt: 'bottom'}"
data-bind="source: equipmentDetailSource, events: { edit: gridEdit }"
data-selectable="cell"
data-filterable="false"
data-auto-bind="true"
data-columns='[ {"field": "EquipmentRequestLineNo", "title": "Line No"},
{"field": "EquipmentId", "title": "Equipment"},
{"field": "Quantity", "title": "Quantity"},
{"field": "RecipientName", "title": "Recipient", "template": kendo.template($("#findUsertemplate").html())},
{"field": "Reason", "title": "Reason"},
{"command": "destroy", "title": " ", "width": "110px"}]'>
</div>
<script type="text/x-kendo-template" id="findUsertemplate">
<div data-role="usersearch" data-bind="value: RecipientBems, events: { change: change }" data-display-bems="false"></div>
</script>
I'm having trouble using my custom widget as a custom editor in a grid. It seems to call the init of my widget 3 times for every line. Also when I click on a cell with my widget, it disappears. The widget works correctly outside of the grid and binds fine. I want my grid to be inline edit with batch edit so it is permanently in edit mode like an Excel spreadsheet. Please can you help me see what I'm doing wrong. Thanks.
My grid definition:
<div
id="elgrid"
style="width: 750px; height: 350px"
data-role="grid"
data-editable="{mode: 'incell', createAt: 'bottom'}"
data-bind="source: equipmentDetailSource, events: { edit: gridEdit }"
data-selectable="cell"
data-filterable="false"
data-auto-bind="true"
data-columns='[ {"field": "EquipmentRequestLineNo", "title": "Line No"},
{"field": "EquipmentId", "title": "Equipment"},
{"field": "Quantity", "title": "Quantity"},
{"field": "RecipientName", "title": "Recipient", "template": kendo.template($("#findUsertemplate").html())},
{"field": "Reason", "title": "Reason"},
{"command": "destroy", "title": " ", "width": "110px"}]'>
</div>
<script type="text/x-kendo-template" id="findUsertemplate">
<div data-role="usersearch" data-bind="value: RecipientBems, events: { change: change }" data-display-bems="false"></div>
</script>