View Full Version : how to remove items from a datastore?

19 Jul 2010, 6:38 PM
I have a datastore associated with a view. In this view I have a Ext.list which refers to that store as well.

something like this:

this.data = new Ext.data.Store({....
this.list = new Ext.List({store: this.data....}

I want to refresh the data so that I can get the latest stuff from the server. The problem is there is no way to clear the store when the new data comes in -- so it just appends it to the existing data. I would like to clear all the stuff in the store before adding the new data. Is there a way to do this?

21 Jul 2010, 7:37 AM
try this.data.loadData, it replaces the entire store

27 Jul 2010, 8:26 PM
AWESOME!!! thank you that worked perfectly... is there a way to remove a certain record?

27 Jul 2010, 11:20 PM
There's a remove() method on the store.