mercredi 4 février 2015

Store doesn't refresh totalCount after adding data

Hey together,

I have a memorystore.

In the beginning everything is working fine.

If i add a record to the store by oStore.add(data), the paging doesn't get the new pagenumber. If i change the page, the new added record is lost.

after adding the record, the store does not change its totalCount, so the paging doesn't know, there is a new page.

If i use a pagingmemory Store nothing works anymore.

Has somebody an example for adding things to a memoryStore I can look at?

Thanks!

Here is the konfiguration of my store:


Code:




oStore = Ext.create('Ext.data.Store', { model: strModel,
success: function(strResult,oDataObject){
// only called when using proxy
Ext.log({level:'debug',dump:oDataObject},"createSelectedItemsStore create success"+strResult);
},
pageSize: nItemsPerPage,
proxy: {
type: 'memory',
enablePaging: true
},
listeners: {
load: {
fn: function(store,data){
// console.debug("createSelectedItemsStore listeners load",store,data);
}
}
},
data: aData
} );





Store doesn't refresh totalCount after adding data

Aucun commentaire:

Enregistrer un commentaire