PDA

View Full Version : MixedCollecion store



1099511627776
21 Dec 2011, 12:26 AM
Hello, world :)
Is there something like arrayStore that works with MixedCollection ?
or ArrayStore workes with MixedCollection by default?

skirtle
21 Dec 2011, 12:40 AM
What do you mean by 'works with'? All stores use MixedCollection internally to hold the data. An ArrayStore is just like any other store but with an array reader configured by default.

1099511627776
21 Dec 2011, 12:56 AM
What do you mean by 'works with'? All stores use MixedCollection internally to hold the data. An ArrayStore is just like any other store but with an array reader configured by default.
I have some data in MixedCollection and I want to display it in GridPanel. So do I need to copy that data to simple JS Array and use ArrayStore to bind it ti GridPanel or there is another way to do this ?

skirtle
21 Dec 2011, 1:15 AM
That's a little odd. Why do you have data as a MixedCollection? While MixedCollection is used heavily behind the scenes it is rare to use it directly to store data, you'd normally use a store instead.

I don't think you'd want to use an ArrayStore specifically, just a normal store would be fine. You can't automatically populate the store from the MixedCollection, as I mentioned this isn't something that people usually need to do. It should be pretty easy to iterate over the collection and extract the data to push into the store though.

1099511627776
21 Dec 2011, 2:45 AM
Ok i agreee that it is odd, that what do you suggest if I need to implement client-side basket goods

1099511627776
21 Dec 2011, 9:53 AM
Thank you very much I've read more carefully about Ext.data.Store and that is exacly what i need.
The question is closed