我希望在页面加载时保存过滤器状态,重新排列/调整大小/排序列等。
我已经看过stateId属性,但我不确定如何使用它。 对此有何帮助?
我在网格下设置了以下属性:
stateful : true,
stateId: 'myGrid',
stateEvents: ['columnhide', 'columnmove', 'columnresize', 'columnshow', 'sortchange'],
我还在Ext.OnReady()的末尾添加了这个:
Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 7))
}));
答案 0 :(得分:1)
如果有,请在Ext.state.*
功能中添加Ext.require
;
// add the following definition after Ext.onReady
Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 7))
}));
// specify statefull and stateId property of the components
{
xtype: 'combobox',
stateful : true,
stateId: 'combobox-one'
}