0
votes

I have 3 different stores (in 3 tabs) which shares the data with only one field is changed. When I click a button of an item on the first store's tab, I want that item to be listed in second store's tab and deleted from the first one. My current (and probably dummy) solution is to use Store.loadData() for each store on each button click event. But when the stores become huge (e.g. thousands or even millions of items), then this wouldn't be a practical solution I believe.

So my question is that, is there any way to reload this kind of stores (which shares data with some unique-for-store fields) when non-shared fields are changed?

1
short answer to your question is 'no'. also, having 'thousands or even millions of items' in the store sounds like a design that needs a revisit. - Amol Katdare
then what should i use to list that much items inside a grid? can you suggest another approach? - fitne

1 Answers

1
votes

You can use the exact same store for multiple grids but you cannot "mix and match" the way you are describing. What you will have to do is -

  • Listen to appropriate events (row or cell level selects)
  • In your listener, modify the records in the stores based on your logic.

To handle "thousands or even millions of items" you can look at the following approaches -