开发者

ExtJs How do I scroll to the bottom of a grid?

开发者 https://www.devze.com 2022-12-27 06:55 出处:网络
I am making a web-based logviewer using extjs. I would like new log-lines to be added to the bottom of my gridview as it saves cpu by not requiring a sort to move it to the top of the grid (plus its

I am making a web-based logviewer using extjs.

I would like new log-lines to be added to the bottom of my gridview as it saves cpu by not requiring a sort to move it to the top of the grid (plus its how my coworkers prefer it).

My problem is that ideally the grid would scroll to the bottom after a new row is add开发者_StackOverflow社区ed.

I have been looking through the documentation and I cannot figure out how to do this. I just see a method to scroll to the top.

Any ideas?

Thanks!


Use GridView's focusRow method, e.g.:

myGrid.getView().focusRow(20);

If you don't already have the row index you'll have to retrieve it using one of GridView's related methods for finding a row.

0

精彩评论

暂无评论...
验证码 换一张
取 消