I have the following code that worked perfectly in 5.0 :


Code:



onDirectstoreLoad: function(store, records, successful, eOpts) {
var grid = Ext.getCmp('sqlExecPlanGrid');
var columnsManager = grid.getView().getHeaderCt();
var columnsCount = columnsManager.getColumnCount();
for (var headerIndex=0; headerIndex<columnsCount; headerIndex++){
var column = columnsManager.getHeaderAtIndex(headerIndex);
columnsManager.autoSizeColumn(column);
var size = column.getSize();
column.setSize(size.width + 10, size.height);
}
}

In 5.1 it no longer works, I firebug I see:

TypeError: this.el is undefined








return this.el.getWidth();


on



Code:



columnsManager.autoSizeColumn(column);