1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    328
    Vote Rating
    1
    ttbgwt is on a distinguished road

      0  

    Default Unanswered: grid column headers mouseover event?

    Unanswered: grid column headers mouseover event?


    I'm trying to figure out how to listen to mouseover events for all of the column headers in a grid? I searched the docs and forums but came up empty...

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    101
    Answers
    343
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Try this:
    Code:
    Ext.create('Ext.grid.Panel', {
        ...
        columns: {
            items: [{
                text: 'Column 1',
                ...
                // listen mouseenter for specific column header
                listeners: {
                    mouseenter: {
                        element: 'el',
                        fn: function(){
                            console.log('mouseenter column 1');
                        }
                    }
                }
            },{
                ...
            }],
            // listen mouseenter for all column headers
            listeners: {
                mouseenter: {
                    element: 'el',
                    fn: function(){
                        console.log('mouseenter');
                    }
                }
            }
        }
    });