Ive created a store, which I can manipulate.
var storeJ = new Ext.data.JsonStore({
root: 'data',
idProperty: primaryKey,
id:'storeJ',
fields: [primaryKey,'name', 'code', 'email'],
autoSave:true,
storeId: 'storeJ',
proxy: proxyJ,
writer: writer,
});
storeJ.load();
When I try to add to this store, via a button, I return a Pk ( via php )
This happens after
storeJ.insert(0, r);
//Tbar Item
handler: function(){
var r = new storeJ.recordType({ });
grid.stopEditing();
storeJ.insert(0, r);
grid.startEditing(0, 1);
}
I assume I need some kinda listener to get there, but how on earth do I create it?
ensure you pass a object in your return, and that the root of the store is correctly pointed to the right object.
Simply returning 1 or so won’t work, you need to return json_encode($return[‘data’]=>1); or its equivalent in the above defined store.