PDA

View Full Version : store and record.getChanges problem



rh_it
26 Jun 2013, 12:54 AM
Hello again, another question how can I get the field id of the value changed in my grid?
I used an event called onXmlstoreUpdate with the this method:




onXmlstoreUpdate: function(store, record, operation, eOpts) {
console.log(record.getChanges);
}



this it returns Object {myField: "XXX123456"}
eventually, how can I get the label "myField" !?

friend
26 Jun 2013, 3:46 AM
Simple Javascript will suffice:



onXmlstoreUpdate: function(store, record, operation, eOpts) {
var changes = record.getChanges();
for (var property in changes) {
console.log('Property/Value = ' + property + "/" + changes[property]);
}
}

rh_it
26 Jun 2013, 4:03 AM
damn, you rock!
thanks a lot