1. #1
    Sencha User davisty's Avatar
    Join Date
    Mar 2010
    Location
    Spanish Fort, Al
    Posts
    270
    Answers
    11
    Vote Rating
    1
    davisty is on a distinguished road

      0  

    Default Answered: How do I determine which items have been selected in a Ext.list

    Answered: How do I determine which items have been selected in a Ext.list


    Hello,

    Im new to Sencha MVC. Im using a multi select itemdisclosure. How do I determine which items have been selected?

    Im sure that the Ext.each is involved somehow.

    Thank You

  2. list.getSelection()

  3. #2
    Sencha User
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    497
    Answers
    25
    Vote Rating
    51
    shepsii has a spectacular aura about shepsii has a spectacular aura about shepsii has a spectacular aura about

      0  

    Default


    list.getSelection()
    I blog about Sencha Touch at www.senchatouchdev.com

  4. #3
    Sencha User
    Join Date
    Nov 2013
    Posts
    57
    Answers
    1
    Vote Rating
    2
    MonkeySleeve is on a distinguished road

      -1  

    Default


    Could you show some code how you managed this? What you could do is use the Ext.Each on the list and check if a item has the css class: x-item-selected.

    Quote Originally Posted by shepsii View Post
    list.getSelection()
    Or this, maybe that works

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    497
    Answers
    25
    Vote Rating
    51
    shepsii has a spectacular aura about shepsii has a spectacular aura about shepsii has a spectacular aura about

      0  

    Default


    Yes, that definitely works. It's in the docs on an Ext.List object. It returns an array of records. You also need to watch out for the preventSelectionOnDisclose config. The docs are your friend!
    I blog about Sencha Touch at www.senchatouchdev.com

  6. #5
    Sencha User davisty's Avatar
    Join Date
    Mar 2010
    Location
    Spanish Fort, Al
    Posts
    270
    Answers
    11
    Vote Rating
    1
    davisty is on a distinguished road

      0  

    Default


    Wow, works great. Thanx Guys ...

Thread Participants: 2