0
votes

I have 2 stores, the 'selected store' loaded using data and the other 'all store' loaded using proxy. I want to remove from 'all store' what is already present in 'selected store'. I am using the store.remove method to accomplish that. When I was testing using inline data in the 'all store' it was working fine but when I switched to Ajax proxy it doesn't work any more. However the data continues to be displayed properly in the grid to which this store is attached. I used console.log to see 'selected store'.data and 'all store'.data. I notice that the 'all store' has items, and keys and length set as zero. When I expand the node in Chrome console I do see the details populated though. See attached (second entry; first is the 'selected store' - loaded using data). Any idea what I may be doing incorrectly.

Screenshot

1

1 Answers

1
votes

After doing some more research on the Internet found the problem and solution. The code was progressing before the store could be loaded. Had to put the code for remove() in a callback for 'load' event. Found solution @ http://www.sencha.com/forum/showthread.php?167381