Jul 14, 2012, 2:36 PM
Ext.net 2.0 RC2 + grid.reconfigure
Hello
one of the reconfigure overrides is as follows
reconfigure: function(store, columns) {
var me = this,
headerCt = me.headerCt;
if (me.lockable) {
me.reconfigureLockable(store, columns);
} else {
if (columns) {
delete me.scrollLeftPos;
headerCt.suspendLayouts();
headerCt.removeAll();
headerCt.add(columns);
}
if (store) {
store = Ext.StoreManager.lookup(store);
me.bindStore(store);
} else {
me.getView().refresh();
}
see the
store = Ext.StoreManager.lookup(store);
which means the lookup will be executed according the serialized store, which obviously can't work
one of the reconfigure overrides is as follows
public virtual void Reconfigure(AbstractStore store, ColumnBase[] columns)
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append("[");
foreach (ColumnBase columnBase in columns)
{
stringBuilder.Append(columnBase.ToConfig());
stringBuilder.Append(",");
}
stringBuilder.Remove(stringBuilder.Length - 1, 1);
stringBuilder.Append("]");
this.Call("reconfigure", new object[2]
{
(object) store.ToConfig(LazyMode.Instance),
(object) new JRawValue((object) ((object) stringBuilder).ToString())
});
}
see the (object) store.ToConfig(LazyMode.Instance),
part. the js counterpart is reconfigure: function(store, columns) {
var me = this,
headerCt = me.headerCt;
if (me.lockable) {
me.reconfigureLockable(store, columns);
} else {
if (columns) {
delete me.scrollLeftPos;
headerCt.suspendLayouts();
headerCt.removeAll();
headerCt.add(columns);
}
if (store) {
store = Ext.StoreManager.lookup(store);
me.bindStore(store);
} else {
me.getView().refresh();
}
see the
store = Ext.StoreManager.lookup(store);
which means the lookup will be executed according the serialized store, which obviously can't work