Hi Lory,
Thanks for contacting Syncfusion support.
We can achieve your requirement by using “
setCellValue” method of the grid as follows,
<script type="text/javascript">
$(function () {
$("#Grid").ejGrid({
. . . .
. . . .
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, editMode: "batch" },
. . . .
. . . .
cellSave: function (args) {
if (args.columnName == "EmployeeID" && args.value == 5) {
//Getting the index of the edited cell row
var index = this.getIndexByRow(args.cell.parent());
//Updating the cell value of the Freight column
this.setCellValue(index, "Freight", 0);
}
}
});
});
</script>
|
We have created a sample with your requirement like editing the
EmployeeID column cell has value “5” then the
Freight column cell value will be updated as “0” using
setCellValue method of the grid.
Please refer the below link for the sample demo,
http://jsplayground.syncfusion.com/flkkd10c
Regards,
Gowthami V.