SERVER SIDE RESPONSE from dataprocessor for grid

If using the dataprocessor with a grid.
We would like to send the data to a PHP script and use the response to change values in the grid.

We use dataprocessor.sendData() all at once.

For example, the user enters an item and qty in the grid, we send data to PHP and the response would include a price for each line. We then want the value of each line to reflect the price the server calculated.

What is the best method for this?

The sample below will be about a single update record - in case of send-all-at-once it will be the same, just may contain multiple action tags

The server can respond as

<data> <action sid="some" tid="some" action="updated" price="123"></action> </data>

It is the same as normal , except of extra attribute
Now on client side you can have

dp.attachEvent("onAfterUpdate", function(sid, action, tid, tag){ if (action == "updated"){ grid.cells(tid, 0).setValue(tag.getAttribute("price")); } })