开发者

how to attach headerclick event for Ext.grid.GridPanel in extjs?

开发者 https://www.devze.com 2022-12-24 20:59 出处:网络
Can you tell me how to attach h开发者_JAVA技巧eaderclick or headerdblclick event to Ext.grid.GridPanel?You can either use the listeners config (at config time) or the .on() method (with a grid referen

Can you tell me how to attach h开发者_JAVA技巧eaderclick or headerdblclick event to Ext.grid.GridPanel?


You can either use the listeners config (at config time) or the .on() method (with a grid reference).

{
    xtype: 'grid',
    listeners: {
        'headerclick': {
            fn: function(grid, col, e){
                // whatever
            },
            scope: this
         }
     }
 }

or

myGrid.on('headerclick', function(grid, col, e){
    // whatever
});
0

精彩评论

暂无评论...
验证码 换一张
取 消