extjs网格恢复列(隐藏/显示),宽度,位置
我想重置网格列(隐藏/显示)、宽度、位置而不重新加载页面。 我正在尝试这个
Ext.getCmp('inventoryResultGrid').applyState(firstState);
,但它只适用于职位。
I want to reset the grid columns (hide / show) ,width,postions without reload the page .
I am trying this
Ext.getCmp('inventoryResultGrid').applyState(firstState);
but it only working for positions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
哪个 ExtJS 版本?
从 EXtJS 3.1.4 中查看 GridPanel.applyState() 的来源:在列之后应用状态确实只存储列模型配置中的值,但不会更改当前设置(位置除外)。
像这样的事情应该做(未经测试):
Which ExtJS version?
From looking at the sources of GridPanel.applyState() in EXtJS 3.1.4: Applying state after columns are indeed only stores the values in the column model's config, but does not change current settings (except for position).
Something like this should do (untested):
尝试像这样的重新配置方法。
您可以在此处找到文档 http ://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.Panel-method-reconfigure
Try reconfigure method like this.
You can find documentation here http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.Panel-method-reconfigure