I need a function that will add/remove column from ExtJS 4 grid. Grid is written in Extjs 4. After I google it I found out following code.
function reconfigure(store, columns) {
// debugger;
var me = grid;
if (me.lockable) {
me.reconfigureLockable(store, columns);
return;
}
if (columns) {
me.headerCt.removeAll();
me.headerCt.add(columns);
}
if (store) {
store = Ext.StoreManager.lookup(store);
me.bindStore(store);
// me.getView().refresh();
} else {
me.getView().refresh();
}
}
This code that I am calling to this function
var store = grid.getStore();
reconfigure(store, fields);
It's replace the headers rows but will not refresh the data. I am using ExtJs 4.0
grid.reconfiguremethod? - Molecular Man