PDA

View Full Version : adding plugin after creating the table



ser
28 Mar 2011, 12:08 AM
App.TabPanel = Ext.extend(App.TabPanelUi, {
initComponent: function() {
Bat.SupplierGroupMaterialTabPanel.superclass.initComponent.call(this);
var grid = this.findByType('editorgrid')[0];
grid.plugins = new Ext.ux.plugins.GroupHeaderGrid({
rows: [[{header: 'groupheader', align: 'center'}]]
});
this.store = new Ext.data.ArrayStore({
data: [['datatest']],
fields: ['name']
});
this.columnModel = new Ext.grid.ColumnModel({
defaults: {
sortable: true,
menuDisabled: true
},
columns: [{header: 'Name', dataIndex: 'name', menuDisabled: true}]
});
grid.reconfigure(this.store, this.columnModel);
grid.addListener('afterrender', this.afterRenderGrid, this);
},
afterRenderGrid: function(grid) {
grid.getView().updateHeaders();
}
}

The table is rendered well, but the plugin does not visible, why?
I'd like to add plug-in after creating the table.

29 Mar 2011, 4:25 AM
You should place

Bat.SupplierGroupMaterialTabPanel.superclass.initComponent.call(this);
*after* your configuration items.

ser
29 Mar 2011, 11:34 PM
ok, thanks. I will try.