View Full Version : Make JsonWriter send changes of old and new records

4 Dec 2009, 8:08 AM
Hello all,

Im on a EditorGridPanel, and when i change the value of a row, Ext.data.JsonWriter send the full info about the new record.

Is it possible to make it send the data of the old or obsolete record also?

Thanks in advance.

4 Dec 2009, 9:40 AM
I need this becouse im trying to edit a table that does not have a primary key, all columns in combination are the primary key.
With this info i can let the server make the update to the database without problems.

(ive try to specify multiple columns in the idProperty attribute, but ext expects only 1 value for it.)


8 Dec 2009, 2:50 PM
Ok, in case anyone cares, i manage to send the old data doing hooking up to the 'beforewrite' event of the store, and do this:

old = Ext.apply({}, rs.data); //copy!
for (var n in rs.modified)
old[n] = rs.modified[n];
opts.params.orig = Ext.encode(old);