Hi Team,
I have a grid that uses batch edit mode and button that uses updateRecord for the said grid. The problem is getting the new data that is updated both using the updateRecord function and updates from user input. If I use a batchSave and getCurrentViewData the data that I get are only those changes made by the user as if the data from the updateRecord is disregarded. If I check the data using getBatchChanges, it would show the former data of the record where updateRecord was used.
Original Data
PKId = 1
ShipQty = 1
Unit = "PACK"
Factor = 25
OrigQty = 25
Description = "Jevity"
function UpdateRecord(pkId){
$("#ShipmentGrid").ejGrid("updateRecord", "PKId", {
"PKId": pkId,
"ShipQty": 5,
"Unit": "CASE",
"Factor": 5,
"OrigQty": 25,
"Description": "Jevity",
});
}
Then user changed ShipQty to '7'
Data Displayed on Grid:
PKId = 1
ShipQty = 7
Unit = "CASE"
Factor = 5
OrigQty = 25
Description = "Jevity"
var grid = $("#ShipmentGrid").data("ejGrid");
var shipData = grid._currentJsonData; <--- at this point ShipQty = 5, Unit = 'CASE'
$("#ShipmentGrid").ejGrid("batchSave");
var grid = $("#ShipmentGrid").data("ejGrid");
var shipData = grid._currentJsonData; <--- at this point ShipQty = 7 but Unit = 'PACK'
What I need to get from shipData is the one that is on display, that is ShipQty = 7, Unit = 'CASE'
Is there a way to simply get the data that is displayed on the grid? or update the record that would reflect after a batchSave?
Thanks