PDA

View Full Version : Only odd row get commited for getModifiedRecords?



lujian98
25 Feb 2010, 10:29 AM
Hi, I try to save modified row records and it works fine until I try to use record.commit() to removed modified sign on top left cell. Here is my code.

Ext.each( this.get( 0).getStore().getModifiedRecords(), function (record) {
// .....
// ajax call ...
record.commit();
}, this);

Without record.commit(), all modified data saved on server, but display modified sign on each cell.

With record.commit(), only odd rows of modified data are saved on server and no modified sign for each cell of these odd rows, but the even rows of modified data are not saved and also display modified sign for each cell of these even rows.

If try to apply save again, remained odd rows of modified data are saved, but remained even rows are not.

Thanks for any help.

Jimmy

lujian98
25 Feb 2010, 1:57 PM
I figured it out.

Instead using record.commit, have to use store.commitChanges.

Cheers.

Jimmy