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');
});
}
}
}
});