Extjs - 滚动到最后一行(所选项目)

问题描述 投票:0回答:1

我想滚动到最后一行或选定的项目或rowIndex 我尝试了一些案例:

                grid.setScrollTop(rowIndex); // not working

                grid.getView().focusRow(rowIndex);// not working

                // not working
                var idx = this.getStore().indexOfId(rowIndex);
                var rowEl = this.getView().getRow(idx);
                rowEl.scrollIntoView(this.getGridEl(), false);

所有这些都不起作用,我怎么能这样做谢谢

编辑: 我有一个窗口包括一个gridpanel,当我添加一个新项目,我想要滚动窗口,以表示感谢 编辑2: 看看我的例子:http://jsfiddle.net/h9Dy9/当我添加一些新项目时,窗口滚动必须移动到最后或选择项目。

extjs grid extjs4.1
1个回答
0
投票

最后一行,它意味着网格的底部对吗?

我尝试使用它,它的工作原理:

var scrollPosition = 100;   
YourGrid.getEl().down('.x-grid-view').scroll('bottom', scrollPosition, true);

我从Grid -scrollTo bottom发现了这个

© www.soinside.com 2019 - 2024. All rights reserved.