|
function actionBegin (args) {
if (args.requestType === "save") { // it’s triggered when updating the data in child grid row
var child = args.form.closest(".e-grid"); // get required child grid element
var row = child.closest("tr").previousElementSibling; // get required parent grid for child grid.
var parent = child.parentElement.closest(".e-grid");
// Refreshed parent grid value without refreshing the whole grid.
var rowInfo = parent.ej2_instances[0].getRowInfo(row);
rowInfo.rowData.ShipName = "text";
parent.ej2_instances[0].setRowData(rowInfo.rowData[parent.ej2_instances[0].getPrimaryKeyFieldNames()[0]], rowInfo.rowData);
}
},
|
|
actionComplete: function(args) {
if (args.requestType === "save") {
var child = args.row.closest(".e-grid");
var row = child.closest("tr").previousElementSibling;
var parent = child.parentElement.closest(".e-grid");
var rowInfo = parent.ej2_instances[0].getRowInfo(row);
rowInfo.rowData.FirstName = "Text";
parent.ej2_instances[0].setRowData(
rowInfo.rowData[parent.ej2_instances[0].getPrimaryKeyFieldNames()[0]],
rowInfo.rowData
);
}
}, |
|
actionBegin: function (args) {
var child;
if (args.requestType === "save" || args.requestType === "delete") {
if (args.requestType === "save") {
var child = document.getElementById(args.form.id.split("EditForm")[0]);
}
if (args.requestType === "delete") {
var child = args.tr[0].closest('.e-grid');
}
var row = child.closest("tr").previousElementSibling;
var parent = child.parentElement.closest(".e-grid");
var rowInfo = parent.ej2_instances[0].getRowInfo(row);
rowInfo.rowData.ShipName = "text";
parent.ej2_instances[0].setRowData(
rowInfo.rowData[
parent.ej2_instances[0].getPrimaryKeyFieldNames()[0]
],
rowInfo.rowData
);
} |