21 Jun 2010 1:32 AM #1
Edit store but not trigger writer to update proxy
I have a GroupingStore that i with this code editing a value:
var unitListGrouping = Ext.StoreMgr.lookup('unitListGrouping'); var rec = unitListGrouping.getById(record.get('Id')); rec.beginEdit(); rec.set('Name', text); rec.commit();
I have tried to run unitListGrouping.save() after commit the record and i has tested to set autosave to true.
I have read many examples that do the same thing but its not triggering the writer to update the proxy.
Someone has an idea why?
21 Jun 2010 1:39 AM #2
- Join Date
- Mar 2007
- The Netherlands
- Vote Rating
1. beginEdit() should always be followed by endEdit() or cancelEdit(). You don't need to use beginEdit/endEdit if you only change a single field in the record.
2. Don't call commit() if you are planning to save() the record (if the save is successful it will be commited). endEdit() will automatically call save() if autoSave:true.
21 Jun 2010 1:45 AM #3
Sometimes maybe better to use the "community" then try to google stuff :P
Have been sitting with his like over 6 hours and you give me the answer in 7 minutes ;-)
By Mike Robinson in forum Ext 3.x: Help & DiscussionReplies: 9Last Post: 22 Mar 2012, 5:28 AM
By Natkeeran in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 10 Nov 2009, 10:27 AM
By excelsis in forum Ext 3.x: BugsReplies: 1Last Post: 20 Jul 2009, 9:07 PM