I need exactly similar grid to this : http://demos.telerik.com/kendo-ui/grid/editing-custom
I am working on a grid with combobox for edit. i have a functionality to add row on button click. On button click i get data from database and add to grid like below. Edit combo box template does not work from the second row. When user adds the first row, combo box works, but from the second row edit templates does not work.
function AddNewROwToGrid()
{
var grid = $("#MyGrid").data("kendoGrid");
var datasource = grid.dataSource;
$.ajax({
type: 'GET',
contentType: 'application/json',
url: MYURL,
success: function (resultData) {
if (resultData.length > 0) {
var gridExistingData = datasource.data();
var mergedData = $.merge(gridExistingData, resultData);
datasource.data(resultData);
}
}
});
}
Below is the configuration of Grid.
editable: true,
{
field: "MyField", title: "New Field", width: "180px", template: "#=MyField#",
editor: function(container, options) {
$('<input data-text-field="MyField" data-value-field="MyField" data-bind="value:' + options.field + '"/>').appendTo(container).kendoComboBox({
dataSource: {
data: autoFillData
},
dataValueField: "MyField",
dataTextField: "MyField",
autobind: true
});
}
},
Please help. it is urgent