Hi lorryl,
Thanks for contacting Syncfusion support.
You can achieve your requirement by calling the “endEdit” method after you have set the dataSource. This will save the record which is in edited state. And see the data source changes by calling the “refresh” method inside the “actionComplete” event with “save” requestType. Please refer to the below code example, documentation and sample link for more information.
actionBegin(args: SaveEventArgs): void {
. . .
if (args.requestType === 'save') {
// To Change the edited record value
args.data['Freight'] = 1;
}
}
actionComplete(args: DialogEditEventArgs): void {
. . .
if (args.requestType == 'save') {
this.grid.refresh();
}
}
click(e) {
this.data.forEach((row) => {
row['Freight'] = 1;
});
this.grid.endEdit();
}
|
Please get back to us if you need further assistance on this.
Regards,
Pavithra S