Hi guys,
I have a MVVM grid. it has a save event to update some columns by edit another column, but only while refresh() run they are updated and shown in the grid, which is very not user friendly. Could you tell me how to update these and won't refresh the whole grid so that the scroll won't be moved? Thanks.
Here is my code:
changeApprovedFOB: function (e) {
debugger;
var data = e.model;
if (e.values.APPROVED_FOB != undefined) {
data.QUOTATION_PREMIUM_DISCOUNT = data.MANUAL_FOB == 0 ? 0 : (Math.round((data.QUOTATION_FOB - data.MANUAL_FOB) / data.MANUAL_FOB) + "%");
if (e.values.APPROVED_FOB != 0) {
data.APPROVED_PREMIUM_DISCOUNT = data.MANUAL_FOB == 0 ? 0 : (Math.round((e.values.APPROVED_FOB - data.MANUAL_FOB) / data.MANUAL_FOB) + "%");
}
this.QuotationDataSource.pushUpdate(data);
$('#Grid').data('kendoGrid').refresh();
}
else {
this.QuotationDataSource.pushUpdate(data);
}
}