- grid.columns.unshift(this.getHeaderConfig());
- grid.on('afterlayout', this.onGridAfterLayout, this, {single: true});
+ // NOTE: features have to be added before init (before Table.initComponent)
+ },
+
+ init: function(grid) {
+ this.callParent(arguments);
+
+ // Columns have to be added in init (after columns has been used to create the
+ // headerCt). Otherwise, shared column configs get corrupted, e.g., if put in the
+ // prototype.
+ grid.headerCt.insert(0, this.getHeaderConfig());
+ grid.on('render', this.bindView, this, {single: true});