Author Topic: How to get just cell that changed not the entire row?  (Read 2490 times)

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
How to get just cell that changed not the entire row?
« on: November 20, 2014, 11:22:05 pm »
I am calling  var changes = $grid.pqGrid("getChanges", { format: "byVal" }),
        updateList = changes.updateList;
   if (updateList && updateList.length > 0) {
      hdnDataField.val(JSON.stringify(updateList));
   }

On my grid I have
trackModel : { on: true },
        editModel: {
           saveKey:$.ui.keyCode.ENTER,
           cellBorderWidth: 1,
           clicksToEdit: 1,
           onBlur: 'save',
            keyUpDown:true},

.....
        editorEnd: function (evt, ui) {
            if (evt.keyCode != $.ui.keyCode.ESCAPE) {
                $grid.pqGrid("saveEditCell");
            }
        }


Now getChanges returns me the entire row, even though I changed just one cell. Is there anyway to get just the cell that changed?

Thank you

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: How to get just cell that changed not the entire row?
« Reply #1 on: November 21, 2014, 04:10:02 pm »
Only the changed cells can be obtained by

1) getChanges( { format: 'raw' })

or

2) getCellsByClass( 'pq-cell-dirty' )