[英]EXT-JS 4.2.1 retain the current Position of scrollbar of form - panel
I am trying to retain the position of the scrollbar in formpanel to show after form refresh . 我试图保留滚动条在formpanel中的位置,以便在刷新表单后显示。 But i am unable to find any solution.Please help me by suggesting solution for this.
但是我找不到任何解决方案。请为此提出建议的解决方案来帮助我。
Thanks & Regards 感谢和问候
Sumanth KP Sumanth KP
I had a similar problem with a grid panel in IE, where on a refresh the grid would scroll to the start of the grid. 我在IE中使用网格面板遇到了类似的问题,在刷新时网格将滚动到网格的开始。 The solution was to add the following function to the grid panel:
解决方案是在网格面板中添加以下功能:
fixIeScrollPosition: function() {
console.log("fix ie scroll position ");
var scrollTarget = this.getScrollTarget();
var currentScrollPosition = scrollTarget.getEl().getScroll().top;
var expectedScrollPosition = scrollTarget.bufferedRenderer.scrollTop;
var correction = expectedScrollPosition - currentScrollPosition; // will be 0 in non-IE
scrollTarget.scrollBy(0,correction);
},
This is triggered by refresh events. 这由刷新事件触发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.