PDA

View Full Version : [FIXED] Grid reconfigure not working



mankz
4 Apr 2014, 5:02 AM
Open a locked grid sample.


Ext.ComponentQuery.query('gridpanel[lockable=true]')[0].reconfigure(new Ext.data.Store(), [{dataIndex : name, locked : true }, { dataIndex : 'name' }])



Notice that the grid isn't using the new store in the locked grid, still showing as many rows as before the reconfigure.

mitchellsimoens
4 Apr 2014, 5:29 AM
Thanks for the report! I have opened a bug in our bug tracker.

extjsldev
22 Jun 2014, 9:44 PM
Hi there I have the reconfigure working with a proxy store but it's throwing the following exception
"Ext.data.AbstractStore#destroyStore" is deprecated.
my store

Ext.define('WebApp.store.Wall', {
extend: 'Ext.data.Store',
model: 'WebApp.model.Wall',
pageSize: 100,
alias: 'store.posts',
totalProperty: 'totalCount',
listeners: {
datachanged: function (store, operation, eOpts ) {
console.log('cccc');
var grid = Ext.ComponentQuery.query('gridsearch')[0];
try {grid.reconfigure(store);}
catch (e) {

}
//grid.getDockedItems()[1].bindStore(store);
},
load: function (store, records, successful, eOpts) {
console.log('load');
var grid = Ext.ComponentQuery.query('gridsearch')[0];
console.log(grid.getDockedItems()[1]);
//grid.getDockedItems()[1].bindStore(store);
//grid.reconfigure(store);
}
}
});

Jump-BF
23 Jun 2014, 12:07 AM
It seems that the deprecated destroyStore is still called in the filters plugin (ext\src\grid\filters\Filters.js) by the bindStore function. Just replacing the call:



me.store.destroyStore();


by



me.store.destroy();


seems fixing the issue.

extjsldev
23 Jun 2014, 12:43 AM
Thanks yes this fixed it

westy
30 Jul 2014, 1:14 AM
It seems that the deprecated destroyStore is still called in the filters plugin (ext\src\grid\filters\Filters.js) by the bindStore function. Just replacing the call:



me.store.destroyStore();


by



me.store.destroy();


seems fixing the issue.

Thanks for this... I've just hit this issue, so will chuck in an override.
Hoping will be fixed in 5.0.1

Cheers,
Westy