How To Add A New Row With Pre Defined Data In Kendo Grid?
I'm trying to add a new row to a kendo grid with selected data from another kendo grid. Its showing a blank row but no data. Here is my code: var PunishmentGridDataSource =
Solution 1:
I tried a similar setup which works as expected:
$("button").click(function() {
var parent = $("#parent-grid").data("kendoGrid");
var child = $("#child-grid").data("kendoGrid");
var selectedDataItem = parent.dataItem(parent.select());
if (selectedDataItem) {
child.dataSource.add({
foo: selectedDataItem.foo
});
}
});
Here is a live demo: http://jsbin.com/EpeMiwe/1/edit
Post a Comment for "How To Add A New Row With Pre Defined Data In Kendo Grid?"