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');
});
}
}
}
});
标签:gridpanel,JSON,myGrid,header,Ext,renderTo,click
From: https://www.cnblogs.com/wkk2020/p/16856807.html