gridpanel header click

var myGrid = Ext.Create('Ext.grid.Panel', {
    renderTo: 'shrGrid',
    renderTo: myGrid,
    store: myStore, //JSON object
    columns: myGrid.columns, //JSON object
    viewConfig: {
         listeners: {
            render: function(component) {
                 Ext.get('headerid').on('click',function() { //reference the id you defined for the column header
                     alert('header clicked');
                 });
            }
        }
    }
});

 

var myGrid = Ext.Create('Ext.grid.Panel', {
    renderTo: 'shrGrid',
    renderTo: myGrid,
    store: myStore, //JSON object
    columns: myGrid.columns, //JSON object
    viewConfig: {
         listeners: {
            render: function(component) {
                 Ext.get('headerid').on('click',function() { //reference the id you defined for the column header
                     alert('header clicked');
                 });
            }
        }
    }
});
posted on 2022-11-04 10:10  wakaka_wka  阅读(14)  评论(0编辑  收藏  举报