Results 1 to 6 of 6

Thread: MixedCollecion store

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    59
    Answers
    6

    Default Answered: MixedCollecion store

    Hello, world
    Is there something like arrayStore that works with MixedCollection ?
    or ArrayStore workes with MixedCollection by default?

  2. 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.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    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.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    59
    Answers
    6

    Default

    Quote Originally Posted by skirtle View Post
    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 ?

  5. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    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.

  6. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    59
    Answers
    6

    Default

    Ok i agreee that it is odd, that what do you suggest if I need to implement client-side basket goods

  7. #6
    Sencha User
    Join Date
    Dec 2011
    Posts
    59
    Answers
    6

    Default

    Thank you very much I've read more carefully about Ext.data.Store and that is exacly what i need.
    The question is closed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •