ExtJS 4 - 网格垂直滚动条问题
在我们的应用程序中,我们有一个包含网格和两个按钮的窗口 - 清除和清除。取回。
用户可以通过单击“检索”按钮将记录从服务器加载到网格中,然后可以通过单击“清除”按钮清除网格存储。
问题是,有时当用户第二次加载网格时,垂直滚动条不起作用。
也就是说,如果用户首先单击“检索”按钮加载记录,然后使用“清除”清空网格,然后再次单击“检索”,则第二次垂直滚动条在网格中不起作用。 >
事实上,垂直滚动条仅在第一次起作用,然后它就会停止工作,直到用户通过刷新浏览器窗口再次重新加载整个页面。
最奇怪的是这个问题并不“一致”。也就是说,此问题仅有时发生,无需执行任何额外操作。单击的“检索”和“清除”按钮相同,来自服务器的数据相同,但滚动条有时会停止工作而不显示任何错误。
这对用户来说非常烦人,并且因为它也没有显示任何错误,因此很难诊断。
有没有人遇到过类似的问题,或者有人可以指出一些有用的东西,这可能会有所帮助。
有关我正在工作的环境的一些信息:
- ExtJS 版本 - 4.0.7
- 检查浏览器 - IE8、IE9、FF4+、Chrome10+
In our application, we have a window containing a Grid and two buttons - Clear & Retrieve.
The user can load the records from the server in the grid by clicking on the Retrieve button and can then clear the grid store by clicking on the Clear button.
The problem is that sometimes the vertical scrollbar does not work when the user loads the grid for the second time.
That is, if the user first clicks on the Retrieve button to load the records and then uses Clear to empty the grid - and again clicks Retrieve, then this second time the vertical scrollbar does not work in the grid.
In fact, the vertical scroll bar works only for the first time and then it stops working until the user reloads the whole page again by refreshing the browser window.
The weirdest thing is that this issue is not 'consistent'. That is, this issue occurs only sometimes without doing anything extra. It is the same Retrieve and Clear buttons which are clicked, same data which comes from the server, but the scrollbar just stops working sometimes without displaying any error.
This gets very annoying for the user and as it is also not displaying any error, thus, its being very difficult to diagnose.
Has anyone faced a similar issue or could anyone please point to something useful which could be of help in this.
Some information about the environment I'm working in:
- ExtJS Version - 4.0.7
- Browsers Checked - IE8, IE9, FF4+, Chrome10+
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我也遇到过网格面板上滚动条的问题。
看来解决方案是设置网格的高度和宽度。
还尝试在链接存储的加载事件上使用此方法:
Me too I've experienced problems with scrollbars on grid panels.
It seems that the solution is to set the height but also the width of the grid.
Try also to use this method on load event of the linked store:
我遇到过 ExtJS 滚动条的问题(它要么停止工作,要么被切断,或者不会自行调整大小),如果没有代码示例,我无法给出任何具体信息,但我每次都通过这样做来处理它以下之一:
1)将有问题的组件放入视口中(尽管不适用于您的窗口)
2)在组件配置中设置明确的高度
3)调整布局配置(适合或边框似乎都有效
)也可以尝试
yourGridPanel.doComponentLayout()
成功加载数据存储(当您的检索方法执行时)。I've experienced problems with the ExtJS scrollbar (where it either stops working or it gets cut off, or won't resize itself), I can't give anything concrete without a code sample but I've handled it each time by doing one of the following:
1) putting the offending component in a viewport (wouldn't work for your window though)
2) setting a definite height in the component config
3) adjusting the layout config (either fit or border seemed to work)
You could also try
yourGridPanel.doComponentLayout()
with a successful dataStore load (when your retrieve method executes).也许你应该将 Extjs lib 更新到 4.1.1 版本。
对于我来说,4.1.1 版本包含了一些网格滚动条问题的修复,我通过在 4.0.7 中修补来解决了这些问题。
maybe you should update Extjs lib to 4.1.1 version.
As for me 4.1.1 version includes fixes for some grid scrollbars issues, which i solved by patching in 4.0.7.