Hi,
I want to load a kendo grid, after load the grid should add a new row at the bottom of the grid. I want as per below screenshot.
This is the below method i am using to create a new row.
function AddNewRow() {
var newRow = { field: "TlpModifierNew", Value: 0 };
var gridName = nmdModelGridTabNames[activeNmdModel3TabId - 1];
var grid = $("#" + gridName).data("kendoGrid");
grid.dataSource.add(newRow);
var theCell = $('#' + gridName + " " +'tbody'+ " " +'tr:last-child td:eq(1)');
$("#" + gridName).data('kendoGrid').editCell(theCell);
}
function onRequestEnd(e) {
debugger
if (e.type == 'create') {
NMDModelGridRefresh();
}
if (e.response) {
AddNewRow();
}
}
When the Kendo grid loads then, it is creating the new row, but after that it will load the records from the database and then refresh the screen and the new row is removing.
After that it is not calling AddNewRow(); method as onRequestEnd method is called once.
Can we somehow call this AddNewRow(); method after the grid is loaded with records.