-
6 Dec 2012 3:18 AM #1
Answered: store not removing the desired data
Answered: store not removing the desired data
Hi There,
I have implemented sencha touch 2 sqlite proxy https://github.com/shepsii/SQLite-Proxy-ST2 .
I am trying to delete the locally stored data after its usage, but the results are strange. I have just gathered part of the code.
Please help!!!Code:record object passed into my controller function {"id":13,"url":"abcdxyz/1354356455113.jpg","album_id":"6","xindex":1} var store=Ext.getStore('MyStore'); store.removeAt(record.xindex); //trying to remove the index-not working, actually removes some random row/object. store.remove(record) //trying to remove the record itself-not working store.sync();

-
Best Answer Posted by eastlander
could you try:
and:Code:store.removeAt(1);
Code:store.remove(store.getById(record.id));
-
6 Dec 2012 4:12 AM #2
could you try:
and:Code:store.removeAt(1);
Code:store.remove(store.getById(record.id));
-
6 Dec 2012 5:27 AM #3
problem persists
problem persists
Thanks for the reply, the problems still persists. It removes the record sometimes, but doesn't work at times. Wondering, what might be the problem!!!!

Thanks,
Nuthan
-
7 Dec 2012 2:44 AM #4
its working
its working
did the trick...Code:store.remove(store.getById(record.id)

I commented the loading of storeThanks eastlanderCode:Ext.getStore('MyStore').load();


Reply With Quote