PDA

View Full Version : Editing grid metadata



TopoFurnier
18 Sep 2012, 9:04 AM
Hi everyone,
I have a grid that is being built at runtime out of a rest service that sends the data as well as the meta-data for the grid.
Now that Im working on adding/removing rows at runtime, I would like to send the modified metadata back to the backend service.
Is there some easy way to do this? I couldnt find anything on the documentation.

Thanks.

metalinspired
18 Sep 2012, 11:25 PM
have you tried this (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Store-method-sync).

TopoFurnier
25 Sep 2012, 4:05 AM
Syncing the store doesn't help. It just send the post req with a json body that includes the new field. What Im looking for, is someway to send the metadata in some fashion similar to the way that it was sent from the server.

metalinspired
25 Sep 2012, 4:26 AM
You should check Ext.data.Model (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Model) more closely.
save() and destroy() methods should fulfill your needs.