Threaded View

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    Holland
    Posts
    98
    Vote Rating
    1
    Answers
    2
    mrduck is on a distinguished road

      0  

    Default Answered: Get record by element in List ("taphold" listener in list)

    Answered: Get record by element in List ("taphold" listener in list)


    I want to create a taphold listener to a List. It's impossible to do this directly on a listitem, but it's possible on the underlying element like this:
    Code:
    this.myList = new Ext.List({
        store: store,
        grouped: true,
        indexBar: true,
        onItemDisclosure: true,
        emptyText: 'its empty',
        itemTpl: template,
        listeners: {
            taphold: { 
                element : 'el',
                fn: function(event, e) {    
                    console.log('taphold');
                    // action
                }
             },
        }
    });
    To proces the taphold, I need the selected record. I've no idea how to get the correct record. Has anyone an idea? Thanks.

  2. Tried using the getRecord method on the list?

Thread Participants: 1