Hi how can i update my store data Phantom=true and Dirty=true. This may help me to save large data to my store. Currently when i load my 3000+ data in my store it does not save all the data fetch from my ajax call json return.
Below is my code:
Code:
console.log("Loading TEO Frame Count");
// Also remove all existing records from store before adding
auditFrameCountTeoStore.getProxy().clear();
auditFrameCountTeoStore.removeAll();
var data = Ext.JSON.decode(response.responseText); //encode Json List
Ext.Array.each(data, function (record) {
record.phantom = true;
record.dirty= true;
auditFrameCountTeoStore.add(record);
});
auditFrameCountTeoStore.load({
callback: function (records, operation, success) {
auditFrameCountTeoStore.sync();
console.log('TEO DATA: ' + auditFrameCountTeoStore.getData().length);
},
scope: this
});
Aucun commentaire:
Enregistrer un commentaire