Using updateRecord with Batch Edit mode
Thanks for contacting Syncfusion support.
We can get only the modified data before batchSave using getBatchChanges(). After batchSave, we can get the current data using getCurrentViewData().
Please refer to the code example and sample for your requirement,
|
<button id="CellChange">Current value</button> <div id="Grid"></div> <script type="text/javascript"> $(function () { $("#Grid").ejGrid({ dataSource: window.gridData, allowPaging: true, …. columns: [ ….. ] }); $("#UpdateButton").ejButton({ click: "UpdateRecord", }); }); function UpdateRecord() { $("#Grid").ejGrid("updateRecord", "OrderID", { "OrderID": 10248, "CustomerID": "Tomps", "EmployeeID": 3, "Freight": 5, "ShipName": "Toms Speziliation", "ShipCountry": "Itally", }); obj = $("#Grid").ejGrid("instance"); obj._bulkEditCellDetails._data = $.extend(true, [], obj.getCurrentViewData());//Setting the data from currentViewData for data reflect in edit form } |
Sample: http://jsplayground.syncfusion.com/ysjkpxvj
In the above sample, we have used Update button to update the dynamic data in grid. After the date updated, we can get the current page data using getCurrentViewData() or model.currentViewData.
Regards,
Sellappandi R
- 1 Reply
- 2 Participants
-
LO Lory
- Oct 20, 2015 04:01 PM UTC
- Oct 21, 2015 08:58 AM UTC