PDA

View Full Version : Updating grid row after updating store from using form



scottmartin
26 Sep 2010, 4:41 PM
What is the best way to update the selected row of a grid after the data has been changed?

Setup:
Using a writer on the the store with autosave: TRUE
The record is updated using an edit form, not grid edit.

I was going to use record.set(...) for each cell then record.commit, but it seems that autosave: TRUE makes the writer execute XHR for each call to record.set().

Would it be better to set autosave: FALSE and issue a save manually?

I can also use store.update, but I would prefer to simply update the grid row instead of having to reload the store.

Regards,
Scott.

laurentParis
26 Sep 2010, 10:22 PM
look on saki example for datas binding
(add http)://examples.extjs.eu/?ex=databind

scottmartin
27 Sep 2010, 4:38 AM
Thanks for the info, but as mentioned, I am using autosave:true. In Saki's example, he is using record.set to update the fields. It sounds like I need to set autosave to false. Is there a way to update the grid row if autosave is true?

Regards,
Scott.