ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: stoodin on November 20, 2014, 11:22:05 pm

Title: How to get just cell that changed not the entire row?
Post by: stoodin 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
Title: Re: How to get just cell that changed not the entire row?
Post by: paramvir 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' )