PDA

View Full Version : [FIXED] [EXTJSIV-3029]Ext.grid.Panel reconfigure columns cannot be ommited



oe.elvik
21 Jun 2011, 1:42 AM
If not supplying columns to th the method reconfigure all columns are removed. In the documentation it says this sould be possible

I found that reconfigure calls headerCt.removeAll(); eavne if columns are omitted.

Here is a temporery fix:


reconfigure: function(store, columns) {
var me = this,
headerCt = me.headerCt;

if (me.lockable) {
me.reconfigureLockable(store, columns);
} else {
headerCt.suspendLayout = true;
if (columns) {
headerCt.removeAll();
headerCt.add(columns);
} else {
headerCt.doLayout();
}
if (store) {
store = Ext.StoreManager.lookup(store);
me.bindStore(store);
} else {
me.getView().refresh();
}
if (columns) {
me.forceComponentLayout();
}
}
me.fireEvent('reconfigure', me);
}

oe.elvik
22 Jun 2011, 11:59 PM
Looks like my temporery fix introduced a new bug.

Now when i resize columns the column title does not folow

oe.elvik
23 Jun 2011, 12:05 AM
Locks like you also have to comment out
//headerCt.suspendLayout = true;

to get resizing working

azuroff
24 Jun 2011, 6:38 AM
grid.reconfigure(store, [])

is another way to remove all columns without worrying about overrides.

oe.elvik
25 Jun 2011, 9:34 AM
Yes, I know thats not what this fix is for..

Acording to the documentation, columns should be optional like:

grid.reconfigure(store)

But currently this wil also remove all colunms. Thats a bug.. I have no trouble removeing the columns but keeping them while changing store dont work.