PDA

View Full Version : clear store



vivendi
31 Aug 2011, 4:24 AM
Hi,

i have a store which is filled with data. But at some point i would like to clear the entire store and add new data to it. But i don't see a .clear() function or anything like that in the API docs.

So my question is, how can i clear a store??

Thanks for any help.

fx-mike
31 Aug 2011, 6:28 AM
store.remove(store.getRange());

vivendi
31 Aug 2011, 6:50 AM
Thanks, i also found out that this worked too:

store.removeAll();

Why isn't this in the API docs..?

fx-mike
31 Aug 2011, 6:53 AM
interesting, I didn't know that.
thanks :D